Class VerticalAlignment
Defines how the diagram elements must be aligned based on its immediate parent.
Inheritance
System.Object
VerticalAlignment
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class VerticalAlignment : Enum
Remarks
To know more about using vertical alignment, refer to these links: |
1. DiagramPort |
2. DiagramNode |
3. DiagramLayout |
4. DiagramUserHandle |
5. DiagramConnectorAnnotation |
6. DiagramNodeAnnotation |
7. NodeExpandIcon |
8. NodeCollapseIcon. |
To apply vertical alignment to a port, use the below code. |
Examples
<SfDiagram Height="600px" Nodes="@NodeCollection">
</SfDiagram>
@code{
public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>() { };
protected override void OnInitialized()
{
/// A node is created and stored in nodes array.
DiagramNode Node = new DiagramNode()
{
/// . .
/// Initialize port collection
Ports = new ObservableCollection<DiagramPort>() {
new DiagramPort() {
VerticalAlignment = VerticalAlignment.Left
}},
};
NodeCollection.Add(Node);
}
}
Fields
Auto
Aligns the diagram element based on its immediate parent’s Vertical alignment property.
Declaration
public const VerticalAlignment Auto
Field Value
Type | Description |
---|---|
VerticalAlignment |
Bottom
Align the diagram element vertically to its immediate parent's bottom side.
Declaration
public const VerticalAlignment Bottom
Field Value
Type | Description |
---|---|
VerticalAlignment |
Center
Align the diagram element vertically to the center of its immediate parent.
Declaration
public const VerticalAlignment Center
Field Value
Type | Description |
---|---|
VerticalAlignment |
Stretch
Stretch the diagram element vertically to its immediate parent’s.
Declaration
public const VerticalAlignment Stretch
Field Value
Type | Description |
---|---|
VerticalAlignment |
Top
Align the diagram element vertically to its immediate parent's top side.
Declaration
public const VerticalAlignment Top
Field Value
Type | Description |
---|---|
VerticalAlignment |
value__
Declaration
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |