TX Text Control .NET Server

ReadOnly Property

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

Description

Gets or sets a value specifying whether the document is read only. Neither the document's text can be changed nor the document can be formatted. The default setting of this property is true.

Syntax

public bool ReadOnly { get; set; }

Examples

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

DocumentPermissions documentPermissions = textControl.DocumentPermissions;

documentPermissions.ReadOnly = true;
if (documentPermissions.ReadOnly)
{
    Console.WriteLine("Document Permissions: Read Only is enabled.");
}

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