Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Need Dashed Link (Read 3103 times)
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Need Dashed Link
Jul 21st, 2009 at 6:43am
Print Post  
Hi Stoyan,

In our application, we need dashed link to connect two nodes. I have tried to set pen like this

Code
Select All
link.Pen = new Pen(Brushes.Black, link.Pen.Thickness, PenLineCap.Flat, PenLineCap.Triangle, PenLineCap.Flat, PenLineJoin.Bevel, 5, DashStyles.Dash); 



but it is giving me error that no overloaded method of pen takes 8 argument.Is their any other way to set link style as Dashed or Dot?

Thanks,
Bala
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need Dashed Link
Reply #1 - Jul 21st, 2009 at 7:52am
Print Post  
Hi,

I can't see a Pen constructor with that many arguments. You should assign these values to the Pen properties:

Pen pen = new Pen(Brushes.Black, 1);
pen.DashStyle = DashStyles.Dash;
...
link.Pen = pen;

Stoyan
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Need Dashed Link
Reply #2 - Jul 21st, 2009 at 10:14am
Print Post  
Hi Stoyan,

I have used DashStyles.Dash to make dashed link, this dashed link has very small dash. I want a big dash with big space between two dashes. Can I set dashwidth and space between two dashes?

Thanks,
Bala
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need Dashed Link
Reply #3 - Jul 21st, 2009 at 12:25pm
Print Post  
Code
Select All
DashStyle dash = new DashStyle();
dash.Dashes = new DoubleCollection(new double[] { 1,7});

Pen pen = new Pen(Brushes.Black, 3);
pen.DashStyle = dash;

link.Pen = pen;
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Need Dashed Link
Reply #4 - Jul 22nd, 2009 at 7:43am
Print Post  
Thanks stoyan Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint