Hi All,
I want to perform basic Edit menu functionalities on my custom design surface.
While all the Cut/Copy/Paste/Deelete/Select functionalities working fine with code below,Undo/Redo standard commands are not working for me.
It will be of great help if sumbody can share a piece of code to implement Undo/Redo functionalitis.
I am using .NET 2003,C#
Help will be much appreciated!
Thanks and Regards,
-Anupam Roy
I want to perform basic Edit menu functionalities on my custom design surface.
While all the Cut/Copy/Paste/Deelete/Select functionalities working fine with code below,Undo/Redo standard commands are not working for me.
Code:
IMenuCommandService menusrv= HostControl.HostSurface.GetService(typeof(IMenuCommandService)) as IMenuCommandService;
if (menusrv != null)
{
switch (editstring)
{
////////////////////////////////////////////
//Undo/Redo not working ////
//////////////////////////////////////////
case "Undo/Redo":
menusrv.GlobalInvoke(StandardCommands.undo/StandardCommands.Redo)
break;
case "Cut":
menusrv.GlobalInvoke(StandardCommands.Cut);
break;
case "Copy":
menusrv.GlobalInvoke(StandardCommands.Copy);
break;
case "Paste":
menusrv.GlobalInvoke(StandardCommands.Paste);
break;
case "Delete":
menusrv.GlobalInvoke(StandardCommands.Delete);
break;
case "SelectAll":
menusrv.GlobalInvoke(StandardCommands.SelectAll);
break;
}
}
I am using .NET 2003,C#
Help will be much appreciated!
Thanks and Regards,
-Anupam Roy
Comment