Completed
Last Updated: 15 Jan 2015 14:39 by ADMIN
ADMIN
Telerik Admin
Created on: 30 Aug 2013 20:24
Category: Diagram
Type: Bug Report
3
Diagrams: DiagramItems deserialization brakes style setters
When a RadDiagramItem is deserialized, some of its properties receive local values. This is why if you have applied style setters on these properties, the value applied by the style setter is no longer used.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
1 comment
ADMIN
Peshito
Posted on: 15 Jan 2015 14:38
This is expected as the Deserialization is part of the Shape recreation and the logic there is executed before the styles are applied. In this scenario the style setters won't be respected.
To fix/workaround this you can handle the Shape(Connection)Serialized event and set the value of the properties that should not be deserialized to null e.g.

        For instance:
        void diagram_ConnectionSerialized(object sender, Telerik.Windows.Controls.Diagrams.ConnectionSerializationRoutedEventArgs e)
        {
            e.SerializationInfo["SourceCapType"] = null;
            e.SerializationInfo["TargetCapType"] = null;
        }