Class Segments
Specifies the segment type of the connector.
Inheritance
System.Object
Segments
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class Segments : Enum
Remarks
To know more about using the segments, refer to this link |
1. Connector |
To apply straight segments, 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 segments type as straight.
Type = Segments.Straight,
};
ConnectorCollection.Add(DiagramConnector);
}
}
Fields
Bezier
Sets the segment type as Bezier.
Declaration
public const Segments Bezier
Field Value
Type | Description |
---|---|
Segments |
Orthogonal
Sets the segment type as Orthogonal.
Declaration
public const Segments Orthogonal
Field Value
Type | Description |
---|---|
Segments |
Polyline
Sets the segment type as Polyline.
Declaration
public const Segments Polyline
Field Value
Type | Description |
---|---|
Segments |
Straight
Sets the segment type as Straight.
Declaration
public const Segments Straight
Field Value
Type | Description |
---|---|
Segments |
value__
Declaration
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |