We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing diagram node background color

Thread ID:

Created:

Updated:

Platform:

Replies:

101205 Oct 6,2011 03:56 PM UTC Oct 12,2011 03:27 PM UTC WPF 3
loading
Tags: Diagram
Michael Day
Asked On October 6, 2011 03:56 PM UTC

I need to change the background color of diagram nodes programmatically. I tried using this code segment as suggested in the help:

public Style style { get; set; }

Setter s = new Setter(System.Windows.Shapes.Path.FillProperty, Brushes.AntiqueWhite);
style = new Style();
style.Setters.Add(s);
aNode.CustomPathStyle = style;

and it did get rid of the blue linear gradient background, but it changed it to gray and not AntiqueWhite. Any ideas?

Also, where is the initial blue linear gradient background set for Syncfusion.Windows.Diagram.Node instances?

Thanks.


Michael Day
Replied On October 7, 2011 08:21 PM UTC

Scratch that. I figured it out.


Jegan R [Syncfusion]
Replied On October 8, 2011 06:34 AM UTC

Hi Michael,

We suspect the recent implementation change is the cause of the issue.

In our earlier versions Shape of Node is always Stretched, from 9.3 release we have provided support customizing the Stretch property through CustomPathStyle. As the default value of Stretch is None, Path will not be stretched. We have prepared a sample to overcome this, please refer the sample from attachment.

Please let us know if you have any concerns.

Regards,
Jegan




NodeStyleTest_e91781b4.zip

Michael Day
Replied On October 12, 2011 03:27 PM UTC

Thanks, Jegan, I figured that out through trial and error.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;