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
    // Example of creating an OrthogonalSegment and adding it to a collection of segments
    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

    The source OrthogonalSegment to copy.

    Properties

    Direction

    Gets or sets the direction of the orthogonal segment.

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

    A Direction representing the segment direction. The default value is null.

    Remarks

    Possible directions include:

    • Left - Sets the segment direction to left.
    • Right - Sets the segment direction to right.
    • Top - Sets the segment direction to top.
    • Bottom - Sets the segment direction to bottom.
    Examples
    // Example of setting the Length and Direction of OrthogonalSegment
    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 the orthogonal segment.

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

    A System.Double representing the length. The default value is null.

    Remarks

    If not set, the length defaults to null, indicating no specific length is enforced.

    Examples
    // Example of setting the Length and Direction of OrthogonalSegment
    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
    System.Object
    Overrides
    ConnectorSegment.Clone()

    Implements

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