XmlEditMode 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 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; }Public Property XmlEditMode As XmlEditModeMembers
| Value | Description |
|---|---|
| Validate | Every 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. |
| NoValidate | Text 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}");textControl.XmlEditMode = XmlEditMode.Validate
Console.WriteLine($"Xml Edit Mode used by Text Control: {textControl.XmlEditMode}")