StructureLevel Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the structure level of all selected paragraphs. The level can be between 0 and 10. A level of 0 indicates that the paragraph belongs to the body of the document.
Syntax
public int? StructureLevel { get; set; }Public Property StructureLevel As Integer?Examples
The following example changes the formatting applied to text entered at the end of a document by using InputFormat.StructureLevel.
textControl.Text = "Project summary";
textControl.InputPosition = new InputPosition(textControl.Text.Length);
InputFormat inputFormat = textControl.InputFormat;
inputFormat.StructureLevel = 10;
if (inputFormat.StructureLevel != null)
{
Console.WriteLine("Input Format: Structure Level is available.");
}textControl.Text = "Project summary"
textControl.InputPosition = New InputPosition(textControl.Text.Length)
Dim inputFormat As InputFormat = textControl.InputFormat
inputFormat.StructureLevel = 10
If inputFormat.StructureLevel IsNot Nothing Then
Console.WriteLine("Input Format: Structure Level is available.")
End IfRemarks
The property returns null when the text selection contains multiple paragraphs with different structure levels.