Class ConnectorTargetDecorator
Defines the properties and features of highlighting the connector’s endpoint.
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class ConnectorTargetDecorator : SfDiagramBase
Remarks
A connector’s target decorator can be customized as per the user’s perception like adding fill color, stroke color, etc.
Examples
<SfDiagram Connectors="@ConnectorCollection">
</SfDiagram>
@code
{
public ObservableCollection<DiagramConnector> ConnectorCollection { get; set; }
protected override void OnInitialized()
{
ConnectorCollection = new ObservableCollection<DiagramConnector>();
DiagramConnector Connector = new DiagramConnector()
{
SourcePoint = new ConnectorSourcePoint() { X = 300, Y = 40 },
TargetPoint = new ConnectorTargetPoint() { X = 400, Y = 160 },
TargetDecorator = new ConnectorTargetDecorator()
{
Shape = DecoratorShapes.Circle,
Style = new DecoratorShapeStyle() { StrokeColor = "#37909A", Fill = "#37909A", StrokeWidth = 1 },
Height = 40,
Width = 40,
Pivot = new DecoratorPivot()
{
X = 0.5,
Y = 0.5
}
},
};
ConnectorCollection.Add(Connector);
}
}
Constructors
ConnectorTargetDecorator()
Defines the properties and features of highlighting the connector’s endpoint.
Declaration
public ConnectorTargetDecorator()
Properties
Height
Defines the height of the target decorator. By default, the Height is set to 10.
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
PathData
Gets or sets the geometry of the target decorator.
Declaration
public string PathData { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Pivot
Gets or sets the position of the connector’s target decorator. The pivot points range from 0 to 1 for both X and Y.
Declaration
public DecoratorPivot Pivot { get; set; }
Property Value
Type | Description |
---|---|
DecoratorPivot |
Shape
Sets the shape of the target decorator.
Declaration
public DecoratorShapes Shape { get; set; }
Property Value
Type | Description |
---|---|
DecoratorShapes |
Remarks
The Shape can be set to Diamond, Doublearrow, OpenArrow, Circle, etc.
Examples
TargetDecorator = new ConnectorTargetDecorator()
{
Shape = DecoratorShapes.Arrow,
},
Style
Gets or sets the appearance of the target decorator.
Declaration
public DecoratorShapeStyle Style { get; set; }
Property Value
Type | Description |
---|---|
DecoratorShapeStyle |
Remarks
The fill color, stroke width, stroke color, etc., of the target decorator, is set in Style.
Examples
TargetDecorator = new ConnectorTargetDecorator()
{
Shape = DecoratorShapes.Arrow,
Style = new DecoratorShapeStyle() { Fill = "red", StrokeWidth = 1 },
},
Width
Defines the width of the target decorator. By default, the Width is set to 10.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double |