Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Link Control Points Multiply When Changing Style (Read 2501 times)
dolfandon
Junior Member
**
Offline



Posts: 51
Location: Northern Virginia
Joined: Mar 12th, 2009
Link Control Points Multiply When Changing Style
Oct 5th, 2010 at 12:38pm
Print Post  
OK, I have a link that has 4 ControlPoints when it is created. I set these from a geometry object. I then change the style of this link to Bezier and magically the ControlPoints multiply to 10. Can I tell it not to do this or create the link as a Bezier to start with so I don't have to switch it? Thanks.

Code
Select All
link.Style = processMapPreferences.StrightLines ? LinkStyle.Polyline : LinkStyle.Bezier; 



Don Miller
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link Control Points Multiply When Changing Sty
Reply #1 - Oct 5th, 2010 at 1:18pm
Print Post  
It happens because links preserve their number of segments when you change the style. You can set Diagram.LinkStyle to Bezier as default value for new links. Another option is to set link.SegmentCount = 1 after setting link.Style = Bezier.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
dolfandon
Junior Member
**
Offline



Posts: 51
Location: Northern Virginia
Joined: Mar 12th, 2009
Re: Link Control Points Multiply When Changing Sty
Reply #2 - Oct 6th, 2010 at 5:12pm
Print Post  
Thanks again Stoyan. Changing the default of the diagram from preferences instead of trying to change the style of the link after it was created did the trick.

Don
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint