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

3 posts, 1 answers
  1. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 21 Feb 2012 Link to this post

    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. Answer
    Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 21 Feb 2012 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 21 Feb 2012 Link to this post

    Perfect! Setting the Geometry to null in the ShapeTemplate did exactly what I needed. Thank you!
Back to Top