EditMode Property
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. Core. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.Server. dll
Description
Gets or sets a value indicating whether the document's text 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 applies bold formatting through the text view generator's selection by using TextViewGenerator.EditMode.
Selection formattedSelection = textViewGenerator.Selection;
formattedSelection.Bold = true;
textViewGenerator.Selection = formattedSelection;
textViewGenerator.EditMode = EditMode.Edit;
Console.WriteLine($"Edit Mode used by Text View Generator: {textViewGenerator.EditMode}");Dim formattedSelection As Selection = textViewGenerator.Selection
formattedSelection.Bold = True
textViewGenerator.Selection = formattedSelection
textViewGenerator.EditMode = EditMode.Edit
Console.WriteLine($"Edit Mode used by Text View Generator: {textViewGenerator.EditMode}")