Class NodeAnnotationMargin
Represents the space around the annotation content.
Inherited Members
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class NodeAnnotationMargin : 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",
//set margin to label
Margin = new NodeAnnotationMargin(){ Top = 30, Left = 10, Bottom = 0, Right = 0}}
}
};
NodeCollection.Add(Node);
}
}
Constructors
NodeAnnotationMargin()
Represents the space around the annotation content.
Declaration
public NodeAnnotationMargin()