I am trying to handle the ToolDeactivate event for the diagram controller. If I load a diagram using the loadsoap diagram method and then add a handler to handle the ToolDeactivate event my event handler is not being called. Other registered events are getting fired. A sample of this is attached. Any help would be appreciated.
ADAdministrator Syncfusion Team December 2, 2004 02:43 PM
The Diagram internally calls MVCDispose() which destroys the model, view, and controller and ensures that they are completely disconnected from the diagram control, when you load a serialized Diagram.
This seems to be a bug and I have brought it to the attention of the Diagram team. This behaviour is also exhibited in the Serialization sample that ships with Essential Diagram. Here is some code that can be added to the OpenFile()routine to wire the eventhandler to the new Controller to work around this issue for now:
//Wire the Controller Events
this.diagram1.Controller.EventsEnabled = true;
ADAdministrator Syncfusion Team December 2, 2004 03:24 PM
I found that I had to actually call CreateController() on the diagram. When the event handler was called after I had set EventsEnabled to true the Controller was nothing and the event threw and exception.