Class TextOverflow
The overflow property allows the user to clip the text content or to add scrollbars when the content of the text element is too large to fit in the specified diagram area.
Inheritance
System.Object
TextOverflow
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class TextOverflow : Enum
Remarks
By default, the TextOverflow is set to Wrap. |
The following code snippet is an example to set TextOverflow for annotations. |
Examples
<SfDiagram Height="600px" Nodes="@NodeCollection">
</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,
OffsetY = 100,
// Sets the style for the text to be displayed
Annotations = new ObservableCollection<DiagramNodeAnnotation>() {
new DiagramNodeAnnotation() {Content = "The text element with property of overflow as Wrap and wrapping as NoWrap",
Style = new AnnotationStyle(){ TextOverflow = TextOverflow.Clip} },
},
};
NodeCollection.Add(Node);
}
}
Fields
Clip
The text is restricted to the node/connector boundary and the text will not be overflown.
Declaration
public const TextOverflow Clip
Field Value
Type | Description |
---|---|
TextOverflow |
Ellipsis
Ellipsis hides the text if the text size exceeds the boundary.
Declaration
public const TextOverflow Ellipsis
Field Value
Type | Description |
---|---|
TextOverflow |
value__
Declaration
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |
Wrap
Wraps the text to the next line, when it exceeds its bounds.
Declaration
public const TextOverflow Wrap
Field Value
Type | Description |
---|---|
TextOverflow |