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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Subclassing a view

Thread ID:

Created:

Updated:

Platform:

Replies:

38518 Dec 14,2005 03:06 PM UTC Dec 15,2005 01:35 AM UTC WinForms 2
loading
Tags: Diagram
Chris C
Asked On December 14, 2005 03:06 PM UTC

We would like to customize the node selection outline by overriding DrawSelectOutline from the View class. We followed the basic instructions found in the KB article http://www.syncfusion.com/support/kb/diagram/Default.aspx?ToDo=view&questId=31 to subclass the view. Everything works as expected except when we save and re-open a diagram. When we re-open the diagram, we no longer have the sub-classed view and thus never make it into our derived DrawSelectOutline method. We used the DiagramBuilder sample as our starting point. I''ve attached the derived classes that we added. In order to use the derived classes, I changed the following lines of code in DiagramForm.cs to use the new classes: //this.diagramComponent = new Syncfusion.Windows.Forms.Diagram.Controls.Diagram(); this.diagramComponent = new MyDiagram(); and //this.diagramComponent = new Syncfusion.Windows.Forms.Diagram.Controls.Diagram(); this.diagramComponent = new MyDiagram(); As I said, it works for a new diagram but not a saved diagram. Hopefully we''re just making some simple mistake with the serialization. Any help as to what we''re missing would be greatly appreciated. Chris C.

Derived.zip

Chris C
Replied On December 14, 2005 03:10 PM UTC

Sorry but I accidentally added the same line of code twice. The two lines of code we changed in DiagramForm.cs are: //private Syncfusion.Windows.Forms.Diagram.Controls.Diagram diagramComponent; private MyDiagram diagramComponent; and //this.diagramComponent = new Syncfusion.Windows.Forms.Diagram.Controls.Diagram(); this.diagramComponent = new MyDiagram(); Sorry for any confusion. Chris C.

Administrator [Syncfusion]
Replied On December 15, 2005 01:35 AM UTC

Hi Chris, We were not aware of this problem. The Essential Diagram View class is no longer a serializable type and uses a special ViewInfo class for persisting the View related data. This is why the deserialization was failing to re-create your custom View. We have added a fix for this problem, and the fix will be a part of the Essential Diagram 4.0 RC that is due very shortly. Please bear with us till the RC is out. Thank you for having brought the issue to our attention. Regards, Prakash Surendra Syncfusion Inc.,

CONFIRMATION

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.

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

;