TX Text Control .NET for WPF

StructureLevel Property

Property|Introduced in 29.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

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; }

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.");
}

Remarks

The property returns null when the text selection contains multiple paragraphs with different structure levels.