Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic subclass DiagramLink (Read 1658 times)
deanhully
YaBB Newbies
*
Offline



Posts: 26
Joined: Aug 25th, 2008
subclass DiagramLink
Sep 17th, 2008 at 5:18pm
Print Post  
Is it possible (and effective) to subclass DiagramLink?

Dean
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: subclass DiagramLink
Reply #1 - Sep 17th, 2008 at 6:08pm
Print Post  
It is possible, for example adding new properties and customizng the appearance by overriding the Draw method should not be a problem. What do you need subclassing DiagramLink for?

Stoyan
  
Back to top
 
IP Logged
 
deanhully
YaBB Newbies
*
Offline



Posts: 26
Joined: Aug 25th, 2008
Re: subclass DiagramLink
Reply #2 - Sep 18th, 2008 at 1:37am
Print Post  
In our diagram a link may actually represent several links between nodes. If I click on the displayed link I will need to load this info into a toolbox. I was considering subclassing vs maintaining the data separately.

Btw, Stoyan,  thanks very much for your quick and knowledgeable responses.

Dean
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: subclass DiagramLink
Reply #3 - Sep 18th, 2008 at 6:57am
Print Post  
You might store that information in the Tag property of links, without subclassing. Otherwise you could subclass, define a new property for the data, override the SaveTo and LoadFrom methods to implement serialization for the new property, and use the RegisterItemClass method to enable serialization for your link class.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint