Class ConnectorFixedUserHandle
Represents the fixed user handle for a connector in the diagram.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class ConnectorFixedUserHandle : FixedUserHandle, IDiagramObject, ICloneable
Remarks
The fixed user handle is used to add frequently used commands around the node and connector, even without selecting them.
Examples
Connector connector = new Connector()
{
SourcePoint = new DiagramPoint() { X = 100, Y = 100 },
TargetPoint = new DiagramPoint() { X = 200, Y = 200 },
Type = ConnectorSegmentType.Orthogonal,
Style = new TextStyle() { StrokeColor = "#6495ED" },
// A fixed user handle is created and stored in the fixed user handle collection of the Connector.
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Height = 25,
Width = 25,
Offset = 0.5,
Alignment = FixedUserHandleAlignment.After,
Displacement = new DiagramPoint { Y = 10 },
Visibility = true,Padding = new DiagramThickness() { Bottom = 1, Left = 1, Right = 1, Top = 1 },
PathData = "M60.3,18H27.5c-3,0-5.5,2.4-5.5,5.5v38.2h5.5V23.5h32.7V18z M68.5,28.9h-30c-3,0-5.5,2.4-5.5,5.5v38.2c0,3,2.4,5.5,5.5,5.5h30c3,0
,5.5-2.4,5.5-5.5V34.4C73.9,31.4,71.5,28.9,68.5,28.9z M68.5,72.5h-30V34.4h30V72.5z"
}
},
};
Constructors
ConnectorFixedUserHandle()
Initializes a new instance of the ConnectorFixedUserHandle.
Declaration
public ConnectorFixedUserHandle()
ConnectorFixedUserHandle(ConnectorFixedUserHandle)
Creates a new instance of the ConnectorFixedUserHandle from the given ConnectorFixedUserHandle.
Declaration
public ConnectorFixedUserHandle(ConnectorFixedUserHandle src)
Parameters
Type | Name | Description |
---|---|---|
ConnectorFixedUserHandle | src | ConnectorFixedUserHandle. |
Properties
Alignment
Gets or sets the alignment of the fixed user handle.
Declaration
public FixedUserHandleAlignment Alignment { get; set; }
Property Value
Type | Description |
---|---|
FixedUserHandleAlignment | The default value will be Center |
Remarks
The below list explains the alignment options.
- Center - Aligns the FixedUserHandle on the connector segment.
- Before - Aligns the FixedUserHandle on top of a connector segment.
- After - Aligns the FixedUserHandle at the bottom of a connector segment.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Height = 25,
Width = 25,
Offset = 0.5,
Alignment = FixedUserHandleAlignment.After,
}
},
};
Displacement
Gets or sets the displacement (margin) of the fixed user handle. Applicable only if the parent is a connector.
Declaration
public DiagramPoint Displacement { get; set; }
Property Value
Type | Description |
---|---|
DiagramPoint | A DiagramPoint representing the displacement from the start of the connector. The default value is a |
Remarks
This property is used to define the offset of the user handle from its default position on the connector.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Alignment = FixedUserHandleAlignment.After,
Displacement = new DiagramPoint { Y = 10 },
}
},
};
Offset
Gets or sets the position of the connector fixed user handle.
By default, it is 0
.
Declaration
public double Offset { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the offset position of the user handle.
The default value is |
Remarks
This property defines the relative position of the fixed user handle on a connector.
The value should be between 0
(start of the connector) and 1
(end of the connector).
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Height = 25,
Width = 25,
Offset = 0.5,
}
},
};
Methods
Clone()
Creates a new object that is a copy of the current ConnectorFixedUserHandle.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A ConnectorFixedUserHandle that is a copy of this instance. |