node has background color but also transparent


I am setting the background color of a node.

node.OffsetX = offsetx;
node.OffsetY = offsety;
node.Width = width;
node.Height = MinLaneHeight;
node.Background = this.Resources[background] as SolidColorBrush;

How would I also make it transparent to show the horizontal/vertical lines?




4 Replies

MF Mary Fontana May 19, 2011 03:18 AM UTC

I meant to say I want to display the horizontal/vertical grid lines for the nodes. So the node has a background color but also shows the grid lines.



DC David Chiew May 20, 2011 05:22 AM UTC

I'm also interested in how to do this, for the Node() object there doesn't appear to be a FillColour attribute, and setting Background-Color to null seems to make it black (i guess null => #000)

I'm just evaluating the sample FlatDiagram, and trying to get that Decision diamond to be transparent (so the arrows are not hidden)

Any ideas?

thanks!
Dave



RT Ramya Thirugnanam Syncfusion Team May 20, 2011 11:10 AM UTC

Hi Mary,

Node’s shape can be customized by using its CustomPathStyle property. The background of the Node’s Shape can be made transparent by applying the Transparent Brush to Fill Property of the Node’s CustomPathStyle. We have created the sample based on your requirement. Please refer to the sample from the attachment.

Please let us know if you have any further queries and we will be happy to help you out.

Regards,
Ramya





NodeBackground_1a5a1bd7.zip


MF Mary Fontana May 24, 2011 06:16 PM UTC

Thanks, that helped me figure out what I was doing wrong.

I did have an opacity setting on the node background color.

I dont remember when I added this line:

diagramView.Page.Background = new SolidColorBrush(Colors.White);

but it caused the horizontal/vertical grid lines to go away.
I understand why now.



Loader.
Up arrow icon