Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramConnectorSegment - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DiagramConnectorSegment

    Specifies the collection connector segment that may have types like Straight, Orthogonal, Beizer.

    Inheritance
    System.Object
    SfDiagramBase
    DiagramConnectorSegment
    Inherited Members
    SfDiagramBase.UpdateCollection(IList, Boolean)
    SfDiagramBase.RandomString(Int32)
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramConnectorSegment : SfDiagramBase
    Remarks

    The connector segment can be customized as per the user’s perception. The available connector segment types are Straight, Orthogonal, Beizer.

    Examples
      
    <SfDiagram Connectors="@ConnectorCollection">
    </SfDiagram>
    @code
    {
      public ObservableCollection<DiagramConnector> ConnectorCollection = new ObservableCollection<DiagramConnector>();
      protected override void OnInitialized()
     {
        DiagramConnector DiagramConnector = new DiagramConnector()
        {
           SourcePoint = new ConnectorSourcePoint() { X = 100, Y = 200 },
           TargetPoint = new ConnectorTargetPoint() { X = 300, Y = 200 },
           Segments = new ObservableCollection<DiagramConnectorSegment>()
          {
            //Create a new segment with length and direction
            new DiagramConnectorSegment()
            {
              Length = 100,
              Type = Segments.Orthogonal,
              Direction = Direction.Right,
            },
         }
        };
       ConnectorCollection.Add(DiagramConnector);
      }
     }

    Constructors

    DiagramConnectorSegment()

    Defines the type of segment. To create a connector segment, specify the source point and target point. Hence a connector of Straight type is formed.

    Declaration
    public DiagramConnectorSegment()

    Properties

    AllowDrag

    Defines whether the connector can be draggable or not.

    Declaration
    public bool AllowDrag { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    AllowDrag is of type Boolean. By default, AllowDrag is true. All the connectors are draggable unless the AllowDrag of it is set to false.

    Direction

    Sets the direction of the orthogonal segment

    Declaration
    public Nullable<Direction> Direction { get; set; }
    Property Value
    Type Description
    System.Nullable<Direction>
    Remarks

    By default, the value of the Direction is null. The Direction of the connector segment can be set to Top, Left, Bottom, or Right.

    Length

    Sets the length of the orthogonal connector segment.

    Declaration
    public Nullable<double> Length { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>
    Remarks

    By default, the value of Length is 0 and it is applicable only for the orthogonal segment.

    Point

    Sets the control point of the Bezier segment.

    Declaration
    public StraightSegmentPoint Point { get; set; }
    Property Value
    Type Description
    StraightSegmentPoint
    Remarks

    It applies only to the Bezier segment.

    Point1

    Sets the first control point of the connector segment

    Declaration
    public FirstSegmentPoint Point1 { get; set; }
    Property Value
    Type Description
    FirstSegmentPoint

    Point2

    Sets the second control point of the connector segment

    Declaration
    public SecondSegmentPoint Point2 { get; set; }
    Property Value
    Type Description
    SecondSegmentPoint

    Type

    Defines the type of connector segment.

    Declaration
    public Segments Type { get; set; }
    Property Value
    Type Description
    Segments
    Remarks

    The connector segments can be of Orthogonal, Straight, Beizer types.

    Vector1

    Defines the length and angle between the source point and the first control point

    Declaration
    public FirstVector Vector1 { get; set; }
    Property Value
    Type Description
    FirstVector
    Remarks

    It applies only to the Bezier segment.

    Vector2

    Defines the length and angle between the target point and the second control point.

    Declaration
    public SecondVector Vector2 { get; set; }
    Property Value
    Type Description
    SecondVector
    Remarks

    It applies only to the Bezier segment.

    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved