This is a migrated thread and some comments may be shown as answers.

How can I override the default orange gradient background of a dynamic node?

2 Answers 98 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
kilhoffer
Top achievements
Rank 1
kilhoffer asked on 21 Feb 2012, 06:27 AM
I'm binding the diagram to a set of custom ViewModels, similar to the OrgChart example in the Telerik bundle. One of my node types has a DataTemplate that draws an ellipse. The background of the grid containing the ellipse is set to 'Transparent', but there is still an orange gradient background visible, as you can see in the screenshot I've attached. For square shapes, this isnt an issue, as I can just provide my own background, but for ellipse shapes, the default background still shows. How can I get rid of this?

 

Thanks in advance. This diagram control is awesome!

2 Answers, 1 is accepted

Sort by
0
Accepted
Miro Miroslavov
Telerik team
answered on 21 Feb 2012, 07:52 AM
Hello,

 Thank you for your feedback. By default the RadDiagramShape has Geometry property that is set to the Rectangle you're seeing. You can either set the Geometry property to Null ( {x:Null}) or set the RadDiagramShape.Bachground property to transparent. But you can also use the built-in Geometry and set it to your ellipse, instead of adding new ellipse to the Content (via DataTemplate). You can read more about the Geometry property in the help.
Hope this helps.

Kind regards,
Miro Miroslavov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
kilhoffer
Top achievements
Rank 1
answered on 21 Feb 2012, 07:57 AM
Perfect! Setting the Geometry to null in the ShapeTemplate did exactly what I needed. Thank you!
Tags
Diagram
Asked by
kilhoffer
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
kilhoffer
Top achievements
Rank 1
Share this question
or