TX Text Control .NET for WPF

XmlEditMode Property

Property|Introduced in 16.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets a value specifying whether Text Control operates in an edit mode that validates the XML document according to the document's DTD.

Syntax

public XmlEditMode XmlEditMode { get; set; }

Members

ValueDescription
ValidateEvery operation that manipulates an XML document is validated according to the document's DTD. This mode is read only and is automatically switched on after loading a valid XML document.
NoValidateText Control operates in its normal editor mode. No validation of an XML document occurs. Because the document can be invalid after every operation the document cannot be saved in XML format.

Examples

The following example uses TextControl.XmlEditMode to configure xml edit mode as part of the text control workflow. The configured value is checked before the workflow continues.

textControl.XmlEditMode = XmlEditMode.Validate;
Console.WriteLine($"Xml Edit Mode used by Text Control: {textControl.XmlEditMode}");