ReadOnly Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
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; }Public Property [ReadOnly] As BooleanExamples
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;Dim documentPermissions As DocumentPermissions = textControl.DocumentPermissions
documentPermissions.ReadOnly = True
If documentPermissions.ReadOnly Then
Console.WriteLine("Document Permissions: Read Only is enabled.")
End If
documentPermissions.ReadOnly = True
documentPermissions.AllowPrinting = True