# TextControl.XmlEditMode Property

> 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.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 16.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > TextControl.XmlEditMode Property
- **430 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/xmleditmode-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/xmleditmode-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/xmleditmode-property/llms-full.txt

---

### 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

```csharp
public XmlEditMode XmlEditMode { get; set; }
```

```vbnet
Public Property XmlEditMode As XmlEditMode
```

### Members

| 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.

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

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

---

## Nearby

- **Previous:** [TextControl.VShrunk Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/vshrunk-event/llms-full.txt)
- **Next:** [TextControl.XmlInvalid Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/xmlinvalid-event/llms-full.txt)
