Well this has a little to do with my other post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=561209&SiteID=1
Every example I've seen so far has you add the object to the design surface, then modify its properties. The problem comes in with the UndoEngine. This is the sequence I've seen
1. Drop a ToolBoxItem onto the design surface
2. UndoItem is created for that object.
3. CreateComponentsCore is called - this is where I set the properties I want.
This works fine. However, lets say I do an Undo which removes the object) then aRedo(which puts it back on the form)right after I add the object to the form. What I've noticed is that the properties I've set are back to their default settings. This means one of two things. Either the UndoItem has the state the object was originally stored in it OR the object is created NEW when it is put back on the form.
In addition to this scenerio, I'm concerned about what happens when I Delete an object from the design surface and then Undo that. Will the object come back as it was, or will it be new? I'm still working on getting this to work though so I haven't found out yet.
I don't mind turning off the undo engine (enabled = false) for when I add a new object, but I'm really worried about the delete.