Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Redo/Undo in CodeDomDesignerLoader
 

Redo/Undo in CodeDomDesignerLoader

Hallo

I'm developping a custom forms designer using this base: http://msdn.microsoft.com/msdnmag/issues/06/03/DesignerHosting/default.aspx
I implemented the UndoEngine interface to use standart Undo() and Redo() commands. (using this source code:
http://www.geocities.com/balcanuc/TestUndoEngine.zip)

When I create a new form using "No Loader" or "Basic Designer Loader", the Undo/Redo works fine. However, if I use the "CodeDomDesignerLoader" the undo/redo works for adding and removing components but if I move or resize a component inside the form then I undo, the component gets selected but does not go back to it previous state. When I debugged the code I found the the UndoEngine is aware of the move/resize operation but undoUnit.Undo() has no effect.

Your help is highly appreciated.

(it's the old thread question from the id Wassim,but there is not solution yet)

anyone has idea or similar problem? thanks!



bell2256@ Tuesday, February 17, 2009 10:36 AM
So the problem with CodeDomDesignerLoader is about the implementation of ITypeResolutionService. The type of "system.drawing.size"and "system.drawing.point"should be detected by the function Gettype() of ITypeResolutionService.I added some codes in this function and the Redo/Undo now working fine under remove and resize.
bell2256@ Monday, February 23, 2009 10:10 AM

Hi Bell,

I have downloaded your TestUndoEngine project. I see you load a new form without loaders when the application starts. I don't think there's any difference when a form is loaded with any kind of loaders.

Could you please show us how you load the new form with BasicDesigner Loader and CodeDomDesignerLoader?

I look forward to your reply!

Sincerely,
Linda Liu

Linda Liu  Thursday, February 19, 2009 9:18 AM
We are changing the issue type to “General Discussion�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.
Linda Liu  Monday, February 23, 2009 8:04 AM
Thank you Linda for your reply,
i have already solved this problem :)
bell2256@ Monday, February 23, 2009 10:03 AM

Hi Bell,

I'm glad to hear you have solved this problem. If you could share with us how you solved this problem, it will be great.

Thanks,
Linda Liu

Linda Liu  Monday, February 23, 2009 10:06 AM
So the problem with CodeDomDesignerLoader is about the implementation of ITypeResolutionService. The type of "system.drawing.size"and "system.drawing.point"should be detected by the function Gettype() of ITypeResolutionService.I added some codes in this function and the Redo/Undo now working fine under remove and resize.
bell2256@ Monday, February 23, 2009 10:10 AM

You can use google to search for other answers

Custom Search

More Threads

• Passing value from child from to parent form
• BUG: Inheritance using custom controls
• How to add "Expression" style to all properties displayed in a PropertyGrid (like in SQL Reporting Designer)
• Remove the icon from the system tray programmatically
• Tab index not working correctly
• How do I access the Design time (Name) property in my Design time code
• radio button in VB6
• Baseclass inherits from component
• Objects in Array List
• VS2005's Form Designer can't find the event's handler if defined in parents class. (VS2003 works)