Class AlignmentOptions
It allows the user to define the alignment position for the selected objects.
Inheritance
System.Object
AlignmentOptions
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class AlignmentOptions : Enum
Examples
<input type="button" value="Alignment" @onclick="@OnAlign" />
<SfDiagram @ref = "@Diagram" Height="600px" Nodes="@NodeCollection">
<DiagramSnapSettings Constraints = "SnapConstraints.None" ></ DiagramSnapSettings >
</ SfDiagram >
@code{
SfDiagram Diagram;
public ObservableCollection<DiagramNode> NodeCollection;
protected override void OnInitialized()
{
NodeCollection = new ObservableCollection<DiagramNode>(){
new DiagramNode()
{
OffsetX = 50, OffsetY = 100,Width = 70, Height = 40,
},
new DiagramNode()
{
OffsetX = 292, OffsetY = 293,Width = 60, Height = 80,
},
};
}
public async void OnAlign()
{
Diagram.SelectAll();
//Aligns the selected items to left
Diagram.Align(AlignmentOptions.Left);
}
}
Fields
Bottom
Aligns the selected objects at the bottom of the selector bounds.
Declaration
public const AlignmentOptions Bottom
Field Value
Type | Description |
---|---|
AlignmentOptions |
Center
Aligns the selected objects at the horizontal center of the selector bounds.
Declaration
public const AlignmentOptions Center
Field Value
Type | Description |
---|---|
AlignmentOptions |
Left
Aligns the selected objects at the left side of the selector bounds.
Declaration
public const AlignmentOptions Left
Field Value
Type | Description |
---|---|
AlignmentOptions |
Middle
Aligns the selected objects at the vertical center of the selector bounds.
Declaration
public const AlignmentOptions Middle
Field Value
Type | Description |
---|---|
AlignmentOptions |
Right
Aligns the selected objects at the right side of the selector bounds.
Declaration
public const AlignmentOptions Right
Field Value
Type | Description |
---|---|
AlignmentOptions |
Top
Aligns the selected objects at the top of the selector bounds.
Declaration
public const AlignmentOptions Top
Field Value
Type | Description |
---|---|
AlignmentOptions |
value__
Declaration
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |