EditMode Property
- Namespace
TXTextControl.WPF
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWPF. dll
Description
Gets or sets a value indicating whether text in the Text Control is read-only, can be selected or is editable.
Syntax
public EditMode EditMode { get; set; }Public Property EditMode As EditModeMembers
| Value | Description |
|---|---|
| Edit | The document's text can be edited and formatted without restrictions. |
| ReadAndSelect | The document's text is displayed and text can be selected. Editing and formatting is restricted as specified through the DocumentPermissions property. |
| ReadOnly | The document's text is only displayed, text cannot be selected. |
| UsePassword | A dialog box to enter a password is opened to protect the edit mode. This value can only be combined with EditMode.ReadAndSelect using the bitwise or operator. |
Examples
The following example uses TextControl.EditMode to configure edit mode as part of the text control workflow. The configured value is checked before the workflow continues.
textControl.EditMode = EditMode.Edit;
Console.WriteLine($"Edit Mode used by Text Control: {textControl.EditMode}");textControl.EditMode = EditMode.Edit
Console.WriteLine($"Edit Mode used by Text Control: {textControl.EditMode}")