menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class OrthogonalSegment - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class OrthogonalSegment

    Represents how an orthogonal segment can be created with length and direction.

    Inheritance
    System.Object
    DiagramObject
    ConnectorSegment
    OrthogonalSegment
    Implements
    IDiagramObject
    System.ICloneable
    Inherited Members
    ConnectorSegment.AllowDrag
    ConnectorSegment.Type
    DiagramObject.GetParent()
    DiagramObject.OnPropertyChanged(String, Object, Object, IDiagramObject)
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class OrthogonalSegment : ConnectorSegment, IDiagramObject, ICloneable
    Examples
    Segments = new DiagramObjectCollection<ConnectorSegment>()
    {
        new OrthogonalSegment 
        {
            Length = 100,
            Type = ConnectorSegmentType.Orthogonal,
            Direction = Direction.Right, 
         },
    }

    Constructors

    OrthogonalSegment()

    Initializes a new instance of the OrthogonalSegment.

    Declaration
    public OrthogonalSegment()

    OrthogonalSegment(OrthogonalSegment)

    Creates a new OrthogonalSegment from the given OrthogonalSegment.

    Declaration
    public OrthogonalSegment(OrthogonalSegment src)
    Parameters
    Type Name Description
    OrthogonalSegment src

    OrthogonalSegment

    Properties

    Direction

    Gets or sets the direction of the orthogonal segment.

    Declaration
    public Nullable<Direction> Direction { get; set; }
    Property Value
    Type
    System.Nullable<Direction>
    Remarks
    1.Left, Sets the connector segment direction as left.
    2.Right, Sets the connector segment direction as right.
    3.Top, Sets the connector segment direction as top.
    4.Bottom, Sets the connector segment direction as bottom.
    Examples
    Connector connector = new Connector()
    {
        ID = "connector1",
          Type = ConnectorSegmentType.Orthogonal,
          Segments=new DiagramObjectCollection<ConnectorSegment>()
          {
             new OrthogonalSegment(){Type = ConnectorSegmentType.Orthogonal, 
             Direction = Direction.Top, Length = 50 }
          }
        SourcePoint = new DiagramPoint() { X = 100, Y = 100 },
        TargetPoint = new DiagramPoint() { X = 200, Y = 200 },
    };

    Length

    Gets or sets the length of orthogonal segment , by default it is null.

    Declaration
    public Nullable<double> Length { get; set; }
    Property Value
    Type
    System.Nullable<System.Double>
    Examples
    Connector connector = new Connector()
    {
        ID = "connector1",
          Type = ConnectorSegmentType.Orthogonal,
          Segments=new DiagramObjectCollection<ConnectorSegment>()
          {
             new OrthogonalSegment(){Type = ConnectorSegmentType.Orthogonal, 
             Direction = Direction.Top, Length = 50 }
          }
        SourcePoint = new DiagramPoint() { X = 100, Y = 100 },
        TargetPoint = new DiagramPoint() { X = 200, Y = 200 },
    };

    Methods

    Clone()

    Creates a new orthogonal segment that is a copy of the current segment.

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object

    OrthogonalSegment

    Overrides
    ConnectorSegment.Clone()

    Implements

    IDiagramObject
    System.ICloneable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved