Bezier line form has been changed after save and then reload

2 posts, 0 answers
  1. Brian
    Brian avatar
    1 posts
    Member since:
    May 2016

    Posted 13 May Link to this post

    Dear all Telerik UI for WPF team members.

    Recently I have encountered a couple of problems with RadDiagram.

    Please help our team to proceed forward soon.


    My question is below.

    When we draw a diagram via your RadDiagram, bezier and spline is perfect form as we expected.

    But, after we decided to save this form and to check whether this form is correct, we reloaded it.

    The problem is here.

    Reloaded diagram is malformed (just we thought)

    Please check attached image file (before & after save a diagram) and our code.


                <telerik:RadDiagram x:Name="diagram" Grid.Row="1" Grid.Column="1"
                                    Width="900" Height="700"
                                    SelectedItem="{Binding SelectedItem}" IsZoomEnabled="False"
                                    IsSnapToItemsEnabled="False" IsSnapToGridEnabled="False"
                                    GraphSource="{Binding GraphSource}"
                                    Margin="{DynamicResource UIBorderMargin}">
                        <telerik:SettingsPane Diagram="{Binding ElementName=diagram}" />


    Thanks in advance.

    Brian Kwon from South Korea.

  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 17 May Link to this post

    Hello Brian,

    We logged this issue in our feedback portal where you can track its status. A possible workaround could be using the ConnectionSerialized/Deserilized events like so:

    private void diagram_ConnectionDeserialized_1(object sender, Telerik.Windows.Controls.Diagrams.ConnectionSerializationRoutedEventArgs e)
              Point startBezier = (Point)Utils.ToPoint((e.SerializationInfo["start"].ToString()));
              Point endBezier = (Point)Utils.ToPoint((e.SerializationInfo["end"].ToString()));
              Dispatcher.BeginInvoke(new Action(() =>
                  (e.Connection as RadDiagramConnection).SetBezierHandles(startBezier, endBezier);
              }), DispatcherPriority.Loaded);
          private void diagram_ConnectionSerialized_1(object sender, Telerik.Windows.Controls.Diagrams.ConnectionSerializationRoutedEventArgs e)
              e.SerializationInfo["start"] = Utils.ToInvariant(e.Connection.ConnectionPoints[0]);
              e.SerializationInfo["end"] = Utils.ToInvariant(e.Connection.ConnectionPoints[1]);

    Petar Mladenov
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top