Class Direction
Specifies the orthogonal connector's connection segment direction.
Inheritance
System.Object
Direction
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class Direction : Enum
Remarks
To know more about using direction, refer to this link: |
1. Connectors |
To apply the connector segment direction, use the below code. |
Examples
<SfDiagram Height="600px" Connectors="@ConnectorCollection">
</SfDiagram>
@code
{
//Defines diagram's connector collection
public ObservableCollection<DiagramConnector> ConnectorCollection = new ObservableCollection<DiagramConnector>();
protected override void OnInitialized()
{
DiagramConnector DiagramConnector = new DiagramConnector()
{
SourcePoint = new ConnectorSourcePoint() { X = 100, Y = 100 },
TargetPoint = new ConnectorTargetPoint() { X = 200, Y = 200 },
TargetDecorator = new ConnectorTargetDecorator()
{
Shape = DecoratorShapes.Arrow,
Style = new DecoratorShapeStyle() { Fill = "#6f409f", StrokeColor = "#6f409f", StrokeWidth = 1 }
},
Style = new ConnectorShapeStyle() { StrokeColor = "#6f409f", StrokeWidth = 1 },
//Specify the connector type as orthogonal.
Type = Segments.Orthogonal,
//Initialize the segments collection
Segments = new ObservableCollection<DiagramConnectorSegment>()
{
//Create a new segment with length and direction
new DiagramConnectorSegment()
{
Length = 100,
Type = Segments.Orthogonal,
Direction = Direction.Right,
},
//Create another new segment with length and direction
new DiagramConnectorSegment()
{
Length = 100,
Type = Segments.Orthogonal,
Direction = Direction.Top,
}
},
};
ConnectorCollection.Add(DiagramConnector);
}
}
Fields
Bottom
Sets the direction of the connector segment direction to Bottom.
Declaration
public const Direction Bottom
Field Value
Type | Description |
---|---|
Direction |
Left
Sets the direction of the connector segment direction to Left.
Declaration
public const Direction Left
Field Value
Type | Description |
---|---|
Direction |
Right
Sets the direction of the connector segment direction to Right.
Declaration
public const Direction Right
Field Value
Type | Description |
---|---|
Direction |
Top
Sets the direction of the connector segment direction to Top.
Declaration
public const Direction Top
Field Value
Type | Description |
---|---|
Direction |
value__
Declaration
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |