Class SelectorConstraints
Specifies the visibility of the selector handles.
Inheritance
System.Object
SelectorConstraints
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class SelectorConstraints : Enum
Examples
<SfDiagram Height="600px" Nodes="@NodeCollection" SelectedItems="@SelectedModel">
</SfDiagram>
@code{
// Defines diagram's nodes collection
public ObservableCollection<DiagramNode> NodeCollection { get; set; }
// Defines diagram's SelectedItems
public Syncfusion.Blazor.Diagrams.DiagramSelectedItems SelectedModel { get; set; }
ObservableCollection<DiagramUserHandle> UserHandles { get; set; }
protected override void OnInitialized()
{
//Creating the userhandle for cloning the objects
DiagramUserHandle CloneHandle = new DiagramUserHandle()
{
//Name of the user handle
Name = "clone",
//Set pathdata for userhandle
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",
//Set visibility for the user handle
Visible = true,
//Set the position for the user handle
Offset = 0,
//Set side based on the given offset
Side = Side.Bottom,
//set margin for the user handle
Margin = new DiagramUserHandleMargin() { Top = 0, Bottom = 0, Left = 0, Right = 0 }
};
//Add user handle to the collection...
UserHandles = new ObservableCollection<DiagramUserHandle>()
{
CloneHandle
};
SelectedModel = new Syncfusion.Blazor.Diagrams.DiagramSelectedItems()
{
//Enable userhandle for selected items...
Constraints = SelectorConstraints.UserHandle,
UserHandles = this.UserHandles
};
NodeCollection = new ObservableCollection<DiagramNode>();
DiagramNode DiagramNode = new DiagramNode()
{
Id = "node1",
OffsetX = 100,
OffsetY = 100,
Width = 100,
Height = 100,
Style = new NodeShapeStyle() { Fill = "#659be5", StrokeColor = "none" },
Annotations = new ObservableCollection<DiagramNodeAnnotation>() { new DiagramNodeAnnotation() { Content = "Node" } }
};
NodeCollection.Add(DiagramNode);
}
}
Fields
All
Shows all handles of the selector.
Declaration
public const SelectorConstraints All
Field Value
ConnectorSourceThumb
Shows the source thumb of the connector.
Declaration
public const SelectorConstraints ConnectorSourceThumb
Field Value
ConnectorTargetThumb
Shows the target thumb of the connector.
Declaration
public const SelectorConstraints ConnectorTargetThumb
Field Value
None
Hides all the selector elements.
Declaration
public const SelectorConstraints None
Field Value
ResizeAll
Shows all resize handles of the selector.
Declaration
public const SelectorConstraints ResizeAll
Field Value
ResizeEast
Shows the middle right resize handle of the selector.
Declaration
public const SelectorConstraints ResizeEast
Field Value
ResizeNorth
Shows the top center resize handle of the selector.
Declaration
public const SelectorConstraints ResizeNorth
Field Value
ResizeNorthEast
Shows the top right resize handle of the selector.
Declaration
public const SelectorConstraints ResizeNorthEast
Field Value
ResizeNorthWest
Shows the top left resize handle of the selector.
Declaration
public const SelectorConstraints ResizeNorthWest
Field Value
ResizeSouth
Shows the bottom center resize handle of the selector.
Declaration
public const SelectorConstraints ResizeSouth
Field Value
ResizeSouthEast
Shows the bottom right resize handle of the selector.
Declaration
public const SelectorConstraints ResizeSouthEast
Field Value
ResizeSouthWest
Shows the bottom left resize handle of the selector.
Declaration
public const SelectorConstraints ResizeSouthWest
Field Value
ResizeWest
Shows the middle left resize handle of the selector.
Declaration
public const SelectorConstraints ResizeWest
Field Value
Rotate
Shows the rotate handle of the selector.
Declaration
public const SelectorConstraints Rotate
Field Value
Shows the default tooltip of nodes and connector.
Declaration
public const SelectorConstraints ToolTip
Field Value
UserHandle
Shows the user handles of the selector.
Declaration
public const SelectorConstraints UserHandle
Field Value
value__
Declaration
Field Value
Type |
Description |
System.Int32 |
|