Class NodeAnnotationDragLimit
Specifies whether the node annotation can be moved or not.
Inherited Members
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class NodeAnnotationDragLimit : DiagramMargin
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 the node array.
DiagramNode Node = new DiagramNode()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Style = new NodeShapeStyle() { Fill = "#6BA5D7", StrokeColor = "white" },
// Initialize port collection
Annotations = new ObservableCollection<DiagramNodeAnnotation>()
{
// An annotation is created and stored in an Annotation collection of Node.
new DiagramNodeAnnotation() { Content = "Annotation",
Constraints= AnnotationConstraints.Select|AnnotationConstraints.Drag,
DragLimit = new NodeAnnotationDragLimit(){Top = 30, Left = 0 ,Right = 20, Bottom = 20 } }
}
};
NodeCollection.Add(Node);
}
}
Constructors
NodeAnnotationDragLimit()
Specifies whether the node annotation can be moved or not.
Declaration
public NodeAnnotationDragLimit()