Class OrthogonalSegment
Represents how an orthogonal segment can be created with length and direction.
Inherited Members
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:
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
Implements
System.ICloneable