TX Text Control .NET for WPF

Activate Method

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

Description

Activates the text frame. The text frame receives the input focus. A text frame can only be activated, if the text part that contains the text frame has the input focus.

Syntax

public bool Activate();

Return Value

The return value is true, if the text frame could be activated. Otherwise it is false.

Examples

The following example applies bold formatting through the text frame's selection by using TextFrame.Activate.

Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;

if (textFrame.Activate())
{
    Console.WriteLine("Activate completed successfully.");
}