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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Syncfusions basic shapes show up as invisible in SfDiagram

Thread ID:

Created:

Updated:

Platform:

Replies:

144340 May 1,2019 03:38 PM UTC May 1,2019 05:40 PM UTC WPF 1
loading
Tags: SfDiagram
Jerod Burnett
Asked On May 1, 2019 03:38 PM UTC

Hello, I'm not sure if this is a bug or if I'm doing something wrong.

Basically I am creating nodes from a data source, and depending on certain properties I would like for the nodes to have different shapes.

Here's the snippet of code I'm focusing on:

if (bool)
{
     Node.UnitWidth = 150;
     Node.UnitHeight = 50;
     Node.Shape = Resources["Ellipse"];
     Node.ShapeStyle = Resources["ShapeStyle"] as Style;
}

if I change "Resources["Ellipse"];" to "new EllipseGeometry(new Rect(new Size(150, 50)));" then it appears correctly, otherwise it is invisible,
I would like to use other basic shapes other than Ellipse, so for them I don't really have a work around, any help is appreciated, thanks.

Ramya Thirugnanam [Syncfusion]
Replied On May 1, 2019 05:32 PM UTC

Hi Jerod, 
 
Thanks for contacting Syncfusion support. 
 
Please set the “Stretch” as “Fill” for ShapeStyle as given below to show the Node with “Ellipse” Shape. 
 
 
 Code example: 
  <Style TargetType="Path" x:Key="ShapeStyle"> 
                <Setter Property="Fill" Value="DarkCyan"></Setter> 
                <Setter Property="Stroke" Value="Black"/> 
                <Setter Property="StrokeThickness" Value="2"></Setter> 
                <Setter Property="Stretch" Value="Fill"></Setter> 
            </Style> 
 
Regards, 
Ramya T 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon