Completed
Last Updated: 07 Oct 2016 13:53 by ADMIN
ADMIN
Ivan
Created on: 14 May 2016 13:39
Category: Diagram
Type: Bug Report
0
Diagram: Bezier connection is not correctly deserialized
When you serialize a bezier connection moved with mouse, the deserialization is not done -well - connection is not with the proper connection points.

Possible workaround:

   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]);
        }


Available in LIB version: 2016.3.1010
0 comments