Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to color a link in the diagram? (Read 3387 times)
Homam
Junior Member
**
Offline


I Love MindFusion!

Posts: 67
Joined: Feb 7th, 2012
How to color a link in the diagram?
Jul 5th, 2014 at 1:37pm
Print Post  
How to color a link? I tried this method but id did not work on the ASP.Net MVC Diagram.

private static void ColorLink(DiagramLink link, bool isItemRepeated)
        {
            var color = isItemRepeated ? Color.Green : Color.ForestGreen;
            link.Brush = new MindFusion.Drawing.SolidBrush(color);
            link.Style = new DiagramLinkStyle
            {
                Stroke = new MindFusion.Drawing.SolidBrush(color),
            };
            link.HeadPen = new MindFusion.Drawing.Pen(new MindFusion.Drawing.SolidBrush(color), 2);
        }
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to color a link in the diagram?
Reply #1 - Jul 7th, 2014 at 5:35am
Print Post  
The Style value won't be used if there's local link.Pen set, so try setting that instead:

Code
Select All
link.Pen = new MindFusion.Drawing.Pen(color); 



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