TX Text Control .NET Server

EditMode Property

Property|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as 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; }

Members

ValueDescription
EditThe document's text can be edited and formatted without restrictions.
ReadAndSelectThe document's text is displayed and text can be selected. Editing and formatting is restricted as specified through the DocumentPermissions property.
ReadOnlyThe document's text is only displayed, text cannot be selected.
UsePasswordA 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}");