Class TextWrap
TextWrap property is used to control the overflow of text in the node boundaries. The wrapping property defines how the text should be wrapped.
Inheritance
System.Object
TextWrap
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class TextWrap : Enum
Remarks
By default, the TextWrap is set to WrapWithOverflow. |
The below link might be useful in understanding the TextWrap, |
1. TextOverflow |
Examples
<SfDiagram Height="600px" Nodes="@NodeCollection">
<DiagramSnapSettings Constraints = "SnapConstraints.None" ></ DiagramSnapSettings >
</ SfDiagram >
@code
{
public ObservableCollection<DiagramNode> NodeCollection { get; set; }
protected override void OnInitialized()
{
NodeCollection = new ObservableCollection<DiagramNode>();
DiagramNode Node = new DiagramNode()
{
Width = 100,
Height = 100,
OffsetX = 100, = 100,
Annotations = new ObservableCollection<DiagramNodeAnnotation>() {
new DiagramNodeAnnotation() {Content = "Annotation Text Wrapping",Style = new AnnotationStyle(){ TextWrapping = TextWrap.Wrap} }
},
};
NodeCollection.Add(Node);
}
}
Fields
NoWrap
The text will not be wrapped. If lengthy text exists, the boundary will not be a limitation.
Declaration
public const TextWrap NoWrap
Field Value
Type | Description |
---|---|
TextWrap |
value__
Declaration
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |
Wrap
The text will be wrapped inside the boundary.
Declaration
public const TextWrap Wrap
Field Value
Type | Description |
---|---|
TextWrap |
WrapWithOverflow
Text-wrapping occurs when the text overflows beyond the available node width. However, the text may overflow beyond the node width in the case of a very long word.
Declaration
public const TextWrap WrapWithOverflow
Field Value
Type | Description |
---|---|
TextWrap |