We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TooDeactivate event not getting fired

Thread ID:





22028 Dec 1,2004 06:32 PM UTC Dec 2,2004 08:24 PM UTC WinForms 2
Tags: Diagram
Truman Lackey
Asked On December 1, 2004 06:32 PM UTC

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. Thanks Truman WindowsApplication4_3089.zip

Administrator [Syncfusion]
Replied On December 2, 2004 07:43 PM UTC

Hi Truman 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: this.diagram1.Refresh(); //Wire the Controller Events this.diagram1.Controller.EventsEnabled = true; this.diagram1.Controller.ToolActivate+=new Syncfusion.Windows.Forms.Diagram.Controller.ToolEventHandler(diagram1_Controller_ToolActivate); Regards Arun

Administrator [Syncfusion]
Replied On December 2, 2004 08:24 PM UTC

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. Truman


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon