TX Text Control .NET for WPF

Selection Property

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

Description

Gets or sets the current selection in the text part with the input focus. This can be the main text, a text frame or a header or footer. The property value is an object of the type Selection. A selection can be used to assign character and paragraph formatting attributes to a piece of text.

Syntax

public Selection Selection { get; set; }

Examples

The following example uses TextControl.Selection to configure selection as part of the text control workflow. The configured value is checked before the workflow continues.

textControl.Selection = new Selection();
if (textControl.Selection != null)
{
    Console.WriteLine("Text Control: Selection is available.");
}

Limitations

Runtime only.