Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SelectorConstraints - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SelectorConstraints

    Specifies the visibility of the selector handles.

    Inheritance
    System.Object
    SelectorConstraints
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class SelectorConstraints : Enum
    Remarks
    To know more about using the selector constraints, refer to this link
    1. Constraints
    2. User handles
    To apply UserHandle selector constraints, use the below code.
    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
    Type Description
    SelectorConstraints

    ConnectorSourceThumb

    Shows the source thumb of the connector.

    Declaration
    public const SelectorConstraints ConnectorSourceThumb
    Field Value
    Type Description
    SelectorConstraints

    ConnectorTargetThumb

    Shows the target thumb of the connector.

    Declaration
    public const SelectorConstraints ConnectorTargetThumb
    Field Value
    Type Description
    SelectorConstraints

    None

    Hides all the selector elements.

    Declaration
    public const SelectorConstraints None
    Field Value
    Type Description
    SelectorConstraints

    ResizeAll

    Shows all resize handles of the selector.

    Declaration
    public const SelectorConstraints ResizeAll
    Field Value
    Type Description
    SelectorConstraints

    ResizeEast

    Shows the middle right resize handle of the selector.

    Declaration
    public const SelectorConstraints ResizeEast
    Field Value
    Type Description
    SelectorConstraints

    ResizeNorth

    Shows the top center resize handle of the selector.

    Declaration
    public const SelectorConstraints ResizeNorth
    Field Value
    Type Description
    SelectorConstraints

    ResizeNorthEast

    Shows the top right resize handle of the selector.

    Declaration
    public const SelectorConstraints ResizeNorthEast
    Field Value
    Type Description
    SelectorConstraints

    ResizeNorthWest

    Shows the top left resize handle of the selector.

    Declaration
    public const SelectorConstraints ResizeNorthWest
    Field Value
    Type Description
    SelectorConstraints

    ResizeSouth

    Shows the bottom center resize handle of the selector.

    Declaration
    public const SelectorConstraints ResizeSouth
    Field Value
    Type Description
    SelectorConstraints

    ResizeSouthEast

    Shows the bottom right resize handle of the selector.

    Declaration
    public const SelectorConstraints ResizeSouthEast
    Field Value
    Type Description
    SelectorConstraints

    ResizeSouthWest

    Shows the bottom left resize handle of the selector.

    Declaration
    public const SelectorConstraints ResizeSouthWest
    Field Value
    Type Description
    SelectorConstraints

    ResizeWest

    Shows the middle left resize handle of the selector.

    Declaration
    public const SelectorConstraints ResizeWest
    Field Value
    Type Description
    SelectorConstraints

    Rotate

    Shows the rotate handle of the selector.

    Declaration
    public const SelectorConstraints Rotate
    Field Value
    Type Description
    SelectorConstraints

    ToolTip

    Shows the default tooltip of nodes and connector.

    Declaration
    public const SelectorConstraints ToolTip
    Field Value
    Type Description
    SelectorConstraints

    UserHandle

    Shows the user handles of the selector.

    Declaration
    public const SelectorConstraints UserHandle
    Field Value
    Type Description
    SelectorConstraints

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved