Class DecoratorSettings
Represents the shape of the end points of the connector.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class DecoratorSettings : DiagramObject, IDiagramObject, ICloneable
Constructors
DecoratorSettings()
Initializes a new instance of the Decorator.
Declaration
public DecoratorSettings()
DecoratorSettings(DecoratorSettings)
Creates a new instance of the Decorator from the given Decorator.
Declaration
public DecoratorSettings(DecoratorSettings src)
Parameters
Type | Name | Description |
---|---|---|
DecoratorSettings | src | Decorator |
Properties
Height
Gets or sets the height of the decorator.
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default is 10 |
Examples
TargetDecorator = new DecoratorSettings()
{
Width = 15, Height = 15, Shape = DecoratorShape.Square
Style = new ShapeStyle()
{
StrokeColor = "#37909A",
Fill = "#37909A",
StrokeWidth = 1,
}
}
PathData
Allows setting a custom shape of the decorator.
Declaration
public string PathData { get; set; }
Property Value
Type |
---|
System.String |
Examples
TargetDecorator = new DecoratorSettings()
{
Shape = DecoratorShape.Custom,
PathData = "M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5 C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",
Style = new ShapeStyle()
{
StrokeColor = "#37909A",
Fill = "#37909A",
StrokeWidth = 1,
}
}
Pivot
The decorator angle will be based on the pivot values, which range from 0 to 1.
Declaration
public DiagramPoint Pivot { get; set; }
Property Value
Type |
---|
DiagramPoint |
Examples
TargetDecorator = new DecoratorSettings()
{
Width = 15, Height = 15, Shape = DecoratorShape.Square
Pivot = DiagramPoint { X = 0, Y = 0.5 };
Style = new ShapeStyle()
{
StrokeColor = "#37909A",
Fill = "#37909A",
StrokeWidth = 1,
}
}
Shape
Gets or sets the shape of the decorator.
Declaration
public DecoratorShape Shape { get; set; }
Property Value
Type | Description |
---|---|
DecoratorShape | The default value will be Arrow |
Remarks
The following options are used to define the shape of the connector. |
1. Arrow - Sets the decorator’s shape to arrow. |
2. None - Sets the decorator's shape to none. |
3. Diamond - Sets the decorator's shape to diamond. |
4. OpenArrow - Sets the decorator shape to open OpenArrow.. |
5. Circle - Sets the decorator shape to circle.. |
5. Square - Sets the decorator shape to Square.. |
Examples
TargetDecorator = new DecoratorSettings()
{
Width = 15, Height = 15, Shape = DecoratorShape.Square
Style = new ShapeStyle()
{
StrokeColor = "#37909A",
Fill = "#37909A",
StrokeWidth = 1,
}
}
Style
Represents the appearance of the decorator.
Declaration
public ShapeStyle Style { get; set; }
Property Value
Type |
---|
ShapeStyle |
Examples
TargetDecorator = new DecoratorSettings()
{
Width = 15, Height = 15, Shape = DecoratorShape.Square
Pivot = DiagramPoint { X = 0, Y = 0.5 };
Style = new ShapeStyle()
{
StrokeColor = "#37909A",
Fill = "#37909A",
StrokeWidth = 1,
}
}
Width
Gets or sets the width of the decorator.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default is 10 |
Examples
TargetDecorator = new DecoratorSettings()
{
Width = 15, Height = 15, Shape = DecoratorShape.Square
Style = new ShapeStyle()
{
StrokeColor = "#37909A",
Fill = "#37909A",
StrokeWidth = 1,
}
}
Methods
Clone()
Creates a new decorator that is a copy of the current decorator.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | Decorator |
Overrides
Implements
System.ICloneable