Class FixedUserHandle
Represents the behavior of a FixedUserHandle which is part of the diagram user handle, providing customization options for appearance and behavior.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class FixedUserHandle : DiagramObject, IDiagramObject, ICloneable
Remarks
This class derives from DiagramObject and contains properties for customizing the appearance and behavior of user handles on a diagram.
Examples
The following example creates a Node with a NodeFixedUserHandle:
Node node1 = new Node()
{
OffsetX = 250,
OffsetY = 250,
Width = 100,
Height = 100,
FixedUserHandles = new DiagramObjectCollection<NodeFixedUserHandle>()
{
new NodeFixedUserHandle()
{
ID = "user1",
Height = 20,
Width = 20,
Visibility = true,
Padding = new DiagramThickness() { Bottom = 1, Left = 1, Right = 1, Top = 1 },
Margin = new DiagramThickness() { Right = 20 },
Offset = new DiagramPoint() { X = 0, Y = 0 },
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
FixedUserHandle()
Initializes a new instance of the FixedUserHandle.
Declaration
public FixedUserHandle()
FixedUserHandle(FixedUserHandle)
Initializes a new instance of the FixedUserHandle class based on another instance.
Declaration
public FixedUserHandle(FixedUserHandle src)
Parameters
Type | Name | Description |
---|---|---|
FixedUserHandle | src | An instance of FixedUserHandle from which to copy properties. |
Properties
CornerRadius
Gets or sets the corner radius of the fixed user handle container.
Declaration
public double CornerRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the corner radius in pixels. The default value is |
Remarks
This property determines the rounding of the corners for the user handle's visual container, providing a more aesthetically pleasing appearance in the diagram.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
CornerRadius = 10,
}
},
};
Fill
Gets or sets the fill color of the fixed user handle.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the fill color. The default value is "transparent". |
Remarks
This property determines the color that appears inside the user handle on the user interface.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Fill="green",
}
},
};
Height
Gets or sets the height of the fixed user handle.
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the height of the fixed user handle. The default value is |
Remarks
The Height property determines the vertical size of the fixed user handle.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Height = 25,
Width = 25,
}
},
};
IconStroke
Gets or sets the stroke color of the fixed user handle.
Declaration
public string IconStroke { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the stroke color. The default value is |
Remarks
Specify the stroke color for the handle using a CSS color string. If set to null, the handle will not display a stroke.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
IconStroke="red",
}
},
};
IconStrokeThickness
Gets or sets the stroke width of the fixed user handle.
Declaration
public double IconStrokeThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double indicating the stroke width. The default value is |
Remarks
This property specifies the thickness of the stroke for the handle's icon. Adjusting the thickness will change the visual weight of the handle.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
IconStrokeThickness = 2,
}
},
};
ID
Gets or sets the unique identifier of the diagram object.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the unique identifier for the ConnectorFixedUserHandle. The default value is |
Remarks
This property is used to uniquely distinguish each fixed user handle object in the diagram.
Ensure that each ID assigned is unique across all diagram objects to prevent conflicts.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
}
},
};
Padding
Gets or sets the space between the fixed user handle and the container.
Declaration
public DiagramThickness Padding { get; set; }
Property Value
Type | Description |
---|---|
DiagramThickness | The space is measured in diagram units. The default value is 0. |
Remarks
This property defines how much space should be maintained between the user handle and its container.
Examples
Demonstrates how to set the padding for a connector's fixed user handle:
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Padding = new DiagramThickness() { Bottom = 4, Left = 4, Right = 4, Top = 4 },
}
},
};
PathData
Gets or sets the shape information of the fixed user handle.
Declaration
public string PathData { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the path data of the fixed user handle's shape. The default value is null. |
Remarks
Ensure the path data is correctly formatted as SVG path data to render shapes properly.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
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"
}
},
};
Stroke
Gets or sets the stroke color of the fixed user handle container.
Declaration
public string Stroke { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the stroke color of the fixed user handle container. The default value is "transparent". |
Remarks
This property allows you to define the visual outline color for a fixed user handle, which helps in visually distinguishing it within a diagram.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
Stroke ="orange",
}
},
};
StrokeThickness
Gets or sets the stroke width of the fixed user handle container.
Declaration
public double StrokeThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the stroke width. The default value is |
Remarks
This property defines the thickness of the stroke used in the fixed user handle container.
Examples
Demonstrates how to set the stroke thickness of a fixed user handle in a connector.
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
StrokeThickness = 10,
}
},
};
Tooltip
Gets or sets the tooltip information for the connector's fixed user handle.
Declaration
public DiagramTooltip Tooltip { get; set; }
Property Value
Type | Description |
---|---|
DiagramTooltip | A DiagramTooltip object. The default is |
Remarks
This property specifies the tooltip that appears when a user interacts with a connector's fixed user handle. Use the Content property to set the message and DiagramTooltip.OpenOn to control its visibility.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Tooltip = new DiagramTooltip() { Content="Clone", OpenOn="Auto" }
}
},
};
Visibility
Gets or sets the visibility of the fixed user handle. By default, it is True.
Declaration
public bool Visibility { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Type: System.Boolean Default Value: true true if the fixed user handle is visible; otherwise, false. |
Remarks
This property determines whether the fixed user handle is visible in the diagram.
By setting it to false, the user handle will be hidden.
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Visibility = true,
}
},
};
Width
Gets or sets the width of the fixed user handle.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the width in pixels. The default value is |
Examples
Connector connector = new Connector()
{
FixedUserHandles = new DiagramObjectCollection<ConnectorFixedUserHandle>()
{
new ConnectorFixedUserHandle()
{
ID = "user1",
Height = 25,
Width = 25,
}
},
};
Methods
Clone()
Creates a new object that is a copy of the current FixedUserHandle.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | An System.Object that is a new instance of FixedUserHandle representing the same state as the original object. |