Class UmlEnumerationMember
Represents a single member in a UML Enumeration.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.Diagram.dll
Syntax
public class UmlEnumerationMember : NodeBase, IDiagramObject, ICloneable
Remarks
The UmlEnumerationMember class defines an individual value within a UmlEnumeration. Each member represents a constant value of the enumeration.
This class supports rendering of normal members using Name as well as visual separators using IsSeparator and SeparatorStyle.
The appearance of the member text can be customized using Style.
Examples
nodes.Add(new Node()
{
ID = "enumNode",
OffsetX = 400,
OffsetY = 200,
Width = 200,
Height = 200,
Shape = new UmlClassifierShape()
{
Classifier = ClassifierShape.Enumeration,
EnumerationShape = new UmlEnumeration()
{
Name = "OrderStatus",
Members = new DiagramObjectCollection<UmlEnumerationMember>()
{
new UmlEnumerationMember() { Name = "Pending" },
new UmlEnumerationMember() { Name = "Confirmed" },
new UmlEnumerationMember() { IsSeparator = true },
new UmlEnumerationMember() { Name = "Shipped" },
new UmlEnumerationMember() { Name = "Delivered" }
}
}
}
});
Constructors
UmlEnumerationMember()
Creates a new instance of the UmlEnumerationMember.
Declaration
public UmlEnumerationMember()
UmlEnumerationMember(UmlEnumerationMember)
Creates a new instance of the UmlEnumerationMember.
Declaration
public UmlEnumerationMember(UmlEnumerationMember src)
Parameters
| Type | Name | Description |
|---|---|---|
| UmlEnumerationMember | src | The source instance. |
Properties
IsSeparator
Gets or sets a value indicating whether this entry is rendered as a separator line.
Declaration
[JsonPropertyName("isSeparator")]
public bool IsSeparator { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether the member is a separator. |
Remarks
When set to true, the member is rendered as a horizontal separator line
instead of a standard enumeration value.
Examples
This example demonstrates adding a separator in an enumeration:
EnumerationShape = new UmlEnumeration()
{
Name = "Priority",
Members = new DiagramObjectCollection<UmlEnumerationMember>()
{
new UmlEnumerationMember() { Name = "High" },
new UmlEnumerationMember() { IsSeparator = true },
new UmlEnumerationMember() { Name = "Low" }
}
}
Name
Gets or sets the name of the enumeration member (literal).
Declaration
[JsonPropertyName("name")]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the member name. The default value is |
Remarks
This property defines the label of the enumeration member displayed in the UML diagram. It represents a constant value within the enumeration.
Examples
This example demonstrates defining enumeration member names:
EnumerationShape = new UmlEnumeration()
{
Name = "Priority",
Members = new DiagramObjectCollection<UmlEnumerationMember>()
{
new UmlEnumerationMember() { Name = "High" },
new UmlEnumerationMember() { Name = "Medium" },
new UmlEnumerationMember() { Name = "Low" }
}
}
SeparatorStyle
Gets or sets the visual style applied to the separator line.
Declaration
[JsonPropertyName("separatorStyle")]
public ShapeStyle SeparatorStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| ShapeStyle | A ShapeStyle that defines the appearance of the separator, such as stroke color, thickness, and dash pattern. |
Remarks
This property defines the visual rendering of the separator when
IsSeparator is set to true, such as stroke color and thickness.
Examples
This example demonstrates customizing separator style:
new UmlEnumerationMember()
{
IsSeparator = true,
SeparatorStyle = new ShapeStyle()
{
StrokeColor = "red",
StrokeWidth = 2
}
}
Style
Gets or sets the text style applied to the enumeration member.
Declaration
[JsonPropertyName("style")]
public TextStyle Style { get; set; }
Property Value
| Type | Description |
|---|---|
| TextStyle | A TextStyle that controls the visual appearance of the member name, including font size, color, weight, and other text-related properties. |
Remarks
This property controls the rendering of the member name, including font color, size, and background fill.
Examples
This example demonstrates applying custom text style to enumeration members:
new UmlEnumerationMember()
{
Name = "Active",
Style = new TextStyle()
{
Fill = "green",
Color = "white"
}
}
Methods
Clone()
This method releasing all unmanaged resources.
Declaration
public override object Clone()
Returns
| Type |
|---|
| object |