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
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
Implements
System.ICloneable