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. Image for the cookie policy date

Snapping is not working.


It works when I first drag and drop from snapping stecil. But I can't Snapping between the items I uploaded to the diagram. What could be the reason? can you help?

        <Syncfusion:SfDiagram x:Name="diagram"


                              Nodes="{Binding Nodes}"






                <Syncfusion:Ruler />



                <Syncfusion:Ruler Orientation="Vertical" />



                <Syncfusion:PageSettings PageWidth="800"







                        <Syncfusion:LengthUnit Unit="Pixels"/>





                <Syncfusion:SnapSettings SnapToObject="All"/>







5 Replies 1 reply marked as answer

PP Prakash Perumal Syncfusion Team February 21, 2023 06:35 AM UTC

Hi Ozgur,

We are unable to reproduce the reported issue that the snap-lines do not appear correctly when interacting with the nodes in the diagram. We have shared you a sample for your reference. Could you please check the sample and try to modify it to reproduce the issue?



Attachment: DiagramSampleSymbol_df7e1883.zip

ÖZ Özgür February 21, 2023 05:29 PM UTC

Thank you for the answer. I will apply. As an additional question, when I do Ctrl+C Ctrl+V, the object is copied but the object is empty. Do I have to activate something for this?

PP Prakash Perumal Syncfusion Team February 22, 2023 09:10 AM UTC

Hi Ozgur,

In SfDiagram, we cannot directly serialize the Content and ContentTemplate properties of a Node. However, we can accomplish this using custom properties. Please refer to the attached modified sample, which enables copying and pasting an object with a custom template.



Attachment: DiagramSample180635_c9c65e2d.zip

ÖZ Özgür February 23, 2023 01:34 PM UTC

Hello, I solved all my problems, thank you. When the node is deleted in the demo you sent, I get a binding error as follows. What is the reason ?

System.Windows.Data Error: 23 : Cannot convert '<null>' from type '<null>' to type 'System.Windows.Media.ImageSource' for 'en-US' culture with default conversions; consider using Converter property of Binding. NotSupportedException:'System.NotSupportedException: ImageSourceConverter, (boş) öğesinden dönüştüremez.

   path: System.ComponentModel.TypeConverter.GetConvertFromException(Object value)

    path : System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)

    path : MS.Internal.Data.DefaultValueConverter.ConvertHelper(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, Boolean isForward)'

PP Prakash Perumal Syncfusion Team February 24, 2023 09:50 AM UTC

Hi Ozgur,

We have identified the reported binding error is caused by clearing the Content property prior to the ContentTemplate property while disposing the node. We will resolve this internally in our upcoming release.

To prevent this error in the meantime, please use the code provided below:

(diagram.Info as IGraphInfo).ItemDeleted += (s, e) =>


    if (e.Item is INode node) node.ContentTemplate = null;




Marked as answer
Live Chat Icon For mobile
Up arrow icon