Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Link Pen Dash to Solid not Working (Read 1680 times)
jacohen
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Aug 14th, 2008
Link Pen Dash to Solid not Working
Sep 3rd, 2008 at 8:37am
Print Post  
After creating a Link using the Factory method, I update the Link Pen so that the links show as either dots or a solid line depending on certain conditions. The change from Solid to Dot works, however from Dot to Solid doesn't, interestingly should I change the code so that it changes between Dot & Dash it works. Any ideas?

Code follows:


DiagramLink link = _facilityLinkToLinkMap[facilityLink];

DashStyle dashStyle = isOperational ? DashStyles.Solid : DashStyles.Dot;

if (link.Pen.DashStyle != dashStyle)
{
link.Pen.DashStyle = dashStyle;
}

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link Pen Dash to Solid not Working
Reply #1 - Sep 3rd, 2008 at 9:46am
Print Post  
You should assign a new Pen object to the property:

link.Pen = new Pen(..., dashStyle);

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