# Integration Guide

> Fit the WPF TextControl into your application: XAML, code, UserControls, data binding, MVVM, commands, layout, styles, TX Spell .NET, DPI and accessibility.

- **Product:** TX Text Control .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for WPF > Integration Guide
- **1495 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/llms-full.txt

---

Once the first window with TX Text Control .NET for WPF runs, the work of fitting it into a real application begins: XAML beyond the basics, controls created in code, the editor inside a `UserControl`, bindings, view models and commands, layouts that resize, application-wide styles, spell checking, barcodes and drawings, display scaling and accessibility. This guide is for WPF developers who have completed [Getting Started](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/llms-full.txt) and want the editor to follow the conventions of their own application.

### How the Editor Connects to a WPF Application

The [WPF.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt) is a `System.Windows.Controls.Control`, declared in XAML with the namespace `TXTextControl.WPF`:

```xml
xmlns:WPF="clr-namespace:TXTextControl.WPF;assembly=TXTextControl.WPF"
```

It connects to the rest of a window in four ways, and each page of this guide uses one or more of them:

- **By name.** The bars, the ribbon tabs and TX Spell .NET are connected through string properties: `ButtonBar="buttonBar1"` names another element of the window, and [SpellChecker](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/spellchecker-property/llms-full.txt) names the key of a resource.
- **By binding.** Dependency properties such as [ZoomFactor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/zoomfactor-property/llms-full.txt) and `ViewMode` are binding targets, and [InputFormat](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inputformat/llms-full.txt) is the binding source for everything that shows the formatting at the input position.
- **By event.** WPF routed events such as `Loaded` and `KeyDown`, and the .NET events of TX Text Control such as `Changed`.
- **By method.** `Load`, `Save`, `Print` and the dialog methods, called from code-behind, command handlers or an interface of your view model.

The document itself is not a dependency property. Its content moves through `Load` and `Save`, which [Binding Document Content](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/data-binding/document-content/llms-full.txt) wraps in an attached property for bindings.

### Find the Right Page

| If you want to | Read |
|---|---|
| Declare and configure the controls in XAML | [XAML Integration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/xaml/llms-full.txt) |
| Create the editor and its bars in code | [Creating and Configuring Controls in Code](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/controls-in-code/llms-full.txt) |
| Put the editor into a `UserControl`, a tab or a dialog window | [Embedding the Editor in Windows and UserControls](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/embedding/llms-full.txt) |
| Run code when the editor is ready | [Control Initialization and Document Access](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/initialization/llms-full.txt) |
| Bind controls to the formatting, or a view model to the document | [Data Binding](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/data-binding/llms-full.txt) |
| Build the window with a view model | [MVVM Integration Patterns](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/mvvm/llms-full.txt) |
| Connect menus, buttons and keys through commands | [Commands and Input Bindings](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/commands/llms-full.txt) |
| Arrange the editor in a `Grid` or `DockPanel` that resizes | [WPF Layout and Resizing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/layout/llms-full.txt) |
| Share styles, colors and converters across windows | [Resource Dictionaries and Styling](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/styling/llms-full.txt) |
| Add spell checking with TX Spell .NET | [Integrating TX Spell .NET for WPF](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/tx-spell/llms-full.txt) |
| Add barcodes and drawings to documents | [Integrating WPF Barcodes and Drawings](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/barcodes-drawings/llms-full.txt) |
| Handle displays with a scale factor | [DPI and Display Scaling](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/dpi-scaling/llms-full.txt) |
| Support screen readers and UI automation | [Accessibility and UI Automation](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/accessibility/llms-full.txt) |
| Let an AI coding assistant look up the TX Text Control documentation | [AI Coding Assistants](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/coding-assistants/llms-full.txt) |

### Where to Start

1. [XAML Integration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/xaml/llms-full.txt) and [Control Initialization and Document Access](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/initialization/llms-full.txt): the basics every other page builds on.
2. [WPF Layout and Resizing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/layout/llms-full.txt) to place the editor in your window.
3. [Data Binding](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/data-binding/llms-full.txt), then [Commands and Input Bindings](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/commands/llms-full.txt) or [MVVM Integration Patterns](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/mvvm/llms-full.txt), depending on how your application is structured.
4. The remaining pages as your application needs them.

### Pages in This Section

- [XAML Integration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/xaml/llms-full.txt): the controls of TX Text Control in XAML.
- [Creating and Configuring Controls in Code](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/controls-in-code/llms-full.txt): the editor and its bars created and connected at run time.
- [Embedding the Editor in Windows and UserControls](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/embedding/llms-full.txt): the editor inside other WPF containers.
- [Control Initialization and Document Access](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/initialization/llms-full.txt): when the editor is ready for a document.
- [Data Binding](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/data-binding/llms-full.txt): bindings to `InputFormat`, the document content and the value converters.
- [MVVM Integration Patterns](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/mvvm/llms-full.txt): a view model with the document, settings and commands, and the code-behind that remains.
- [Commands and Input Bindings](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/commands/llms-full.txt): routed commands, command bindings and key bindings for the editor.
- [WPF Layout and Resizing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/layout/llms-full.txt): `DockPanel`, `Grid`, view modes and the size of the editor.
- [Resource Dictionaries and Styling](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/styling/llms-full.txt): implicit styles, color sets and converters in *App.xaml*.
- [Integrating TX Spell .NET for WPF](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/tx-spell/llms-full.txt): spell checking in the editor with TX Spell .NET.
- [Integrating WPF Barcodes and Drawings](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/barcodes-drawings/llms-full.txt): barcodes and drawings in the documents of the editor.
- [DPI and Display Scaling](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/dpi-scaling/llms-full.txt): the editor and its bars on displays with a scale factor above 100%.
- [Accessibility and UI Automation](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/accessibility/llms-full.txt): the editor for screen readers and UI automation.
- [AI Coding Assistants](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/coding-assistants/llms-full.txt): the Text Control MCP Server and Agent Skills for GitHub Copilot, Claude Code and other assistants.

---

## In This Section

- [Accessibility and UI Automation](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/accessibility/llms-full.txt): Automate the WPF TextControl with UI Automation: TextPattern attributes, ValuePattern, EM_REPLACESEL to the AutomationId window handle, and ribbon key tips.
- [Integrating WPF Barcodes and Drawings](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/barcodes-drawings/llms-full.txt): Insert barcodes and drawings into WPF documents: BarcodeFrame, TXDrawingControl shapes with fill, outline and z-order, the Insert tab and TXBarcodeCore SVG.
- [AI Coding Assistants](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/coding-assistants/llms-full.txt): Let GitHub Copilot, Claude Code or Cursor search the TX Text Control docs through the MCP Server while you build a WPF app, and learn what Agent Skills cover.
- [Commands and Input Bindings](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/commands/llms-full.txt): Connect WPF menus, toolbars and KeyBinding to the TextControl with RoutedUICommand and CommandBinding, using CanCopy, CanUndo and CanPrint for CanExecute.
- [Creating and Configuring Controls in Code](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/controls-in-code/llms-full.txt): Create the WPF TextControl, ButtonBar, RulerBar, StatusBar, ribbon tabs and Sidebar in C#: names with RegisterName, DockPanel placement and removing controls.
- [Data Binding](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/data-binding/llms-full.txt): Which TextControl properties are binding targets, why InputFormat and CanUndo are sources, and how bars, the document and converters fit into WPF bindings.
- [DPI and Display Scaling](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/dpi-scaling/llms-full.txt): Scale a WPF app with TX Text Control on high-resolution displays: system DPI awareness, and sharp built-in icons for your own buttons with ResourceProvider.
- [Embedding the Editor in Windows and UserControls](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/embedding/llms-full.txt): Embed the WPF TextControl in a UserControl that loads documents when ready, set EntryAssembly in control libraries and share bars between several editors.
- [Control Initialization and Document Access](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/initialization/llms-full.txt): When the WPF TextControl is ready: the Loaded event, runtime-only members, DocumentLoaded and ContentsReset, opening a file at startup and UI thread access.
- [WPF Layout and Resizing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/layout/llms-full.txt): Arrange the WPF TextControl, ButtonBar, RulerBar and StatusBar in a DockPanel or Grid with GridSplitter, and choose the ViewMode that fits a resizing window.
- [MVVM Integration Patterns](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/mvvm/llms-full.txt): Build an MVVM window around the WPF TextControl: a view model with the document, ZoomFactor binding, RelayCommand, an editor interface and ServerTextControl.
- [Resource Dictionaries and Styling](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/styling/llms-full.txt): Share implicit styles, TextControlColors, StatusBarColors and converters in a resource dictionary merged in App.xaml, and switch editor colors at run time.
- [Integrating TX Spell .NET for WPF](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/tx-spell/llms-full.txt): Add TX Spell .NET to a WPF TextControl: TXSpell.WPF.SDK package, a TXSpellChecker resource in XAML, the SpellChecker key, the Proofing tab and deployment.
- [XAML Integration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/xaml/llms-full.txt): Declare TextControl, ribbon tabs, bars and Sidebar in XAML with the WPF prefix: connections by name, property elements, event attributes and the XAML Designer.

---

## Nearby

- **Previous:** [Timestamp Configuration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/digital-signatures/timestamps/llms-full.txt)
- **Next:** [XAML Integration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/xaml/llms-full.txt)
