Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic shape node boder (Read 1371 times)
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
shape node boder
Dec 5th, 2012 at 3:04pm
Print Post  
Hello,

I have a Shape node in my diagram, it has a colored border set using the stroke property. I now want in some specific case to restrict the border to right and top sides only. Is it possible or would I be needed to switch to templated nodes?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: shape node boder
Reply #1 - Dec 5th, 2012 at 7:00pm
Print Post  
Hi,

You could set the node's Shape to the one below, and set node.Stroke = Brushes.Transparent when only the top and right borders should be left visible. Set the decoration line colors to the ones you use for the nodes.

Code
Select All
Shape topRightBorders = new Shape(
	Shapes.Rectangle.Outline,
	new[]
	{
		new LineTemplate(0, 0, 100, 0, Colors.Black, DashStyles.Solid, 1),
		new LineTemplate(100, 0, 100, 100, Colors.Black, DashStyles.Solid, 1)
	},
	null, FillRule.Nonzero, "TopRightBorders");
 



Alternatively, use custom drawing to draw lines from the DrawNode event handler.

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