Completed
Last Updated: 13 Jun 2018 06:19 by ADMIN
ADMIN
Dinko | Tech Support Engineer
Created on: 09 Oct 2017 16:36
Category: Diagram
Type: Bug Report
1
Diagram: ArgumentException is thrown when shape with custom connectors and no default connector is dropped from toolbox to diagram.
As a workaround, you can create a custom class which derives from RadDiagramConnector and override the Serialize() method.

public class CustomConnector : RadDiagramConnector
    {
        static CustomConnector()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomConnector), new FrameworkPropertyMetadata(typeof(CustomConnector)));
        }
    
    public override SerializationInfo Serialize()
        {
            var info = new Telerik.Windows.Diagrams.Core.SerializationInfo(this.GetType());

            if (this.Name != null) info[Telerik.Windows.Diagrams.Core.SerializationConstants.ConnectorName] = this.Name;

            info[Telerik.Windows.Diagrams.Core.SerializationConstants.Offset] = this.Offset.ToInvariant();

            if (Telerik.Windows.Controls.DependencyObjectExtensions.IsLocalValueSet(this, RadDiagramConnector.WidthProperty)) info[Telerik.Windows.Diagrams.Core.SerializationConstants.Width] = this.Width.ToInvariant();
            if (Telerik.Windows.Controls.DependencyObjectExtensions.IsLocalValueSet(this, RadDiagramConnector.HeightProperty)) info[Telerik.Windows.Diagrams.Core.SerializationConstants.Height] = this.Height.ToInvariant();
            this.SerializePrimitives(info);

            return info;
        }
    }
}
1 comment
ADMIN
Ralitsa
Posted on: 13 Jun 2018 06:19
Hi, 

The feature will be available in our next official version – R2 2018 SP1, scheduled for the 20-th June 2018.

Best regards,
Ralitsa Kumanova