TX Text Control .NET for WPF

AllowFormatting Property

Property|Introduced in 25.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 a value specifying whether the document can be formatted. The default setting of this property is true. To use formatting styles, the AllowFormattingStyles property must also be set to true.

Syntax

public bool AllowFormatting { get; set; }

Examples

The following example configures document permissions for the current document by using DocumentPermissions.AllowFormatting.

DocumentPermissions documentPermissions = textControl.DocumentPermissions;

documentPermissions.AllowFormatting = true;
if (documentPermissions.AllowFormatting)
{
    Console.WriteLine("Document Permissions: Allow Formatting is enabled.");
}

documentPermissions.ReadOnly = true;
documentPermissions.AllowPrinting = true;