TX Text Control .NET Server

CanCharacterFormat Property

Property|Introduced in 25.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Informs whether the currently selected text can be formatted with character formatting attributes. The property's value depends on the DocumentPermissions.AllowFormatting property and the currently set edit mode.

Syntax

public bool CanCharacterFormat { get; }

Examples

The following example applies bold formatting through the text view generator's selection by using TextViewGenerator.CanCharacterFormat.

Selection formattedSelection = textViewGenerator.Selection;
formattedSelection.Bold = true;
textViewGenerator.Selection = formattedSelection;

if (textViewGenerator.CanCharacterFormat)
{
    Console.WriteLine("Text View Generator is ready for this operation.");
}

Limitations

Runtime only.

Read only.