# Add TextControl in XAML

> Declare the TXTextControl.WPF namespace, add a TextControl in XAML, set ViewMode and DisplayColors, bind ZoomFactor, handle Loaded and Changed, or use code.

- **Product:** TX Text Control .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for WPF > Getting Started > Document Editor > Add TextControl in XAML
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/llms-full.txt

---

## On This Page

- [Declare the Namespace](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/#declare-the-namespace)
- [Add the Editor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/#add-the-editor)
- [Set Properties and Events in XAML](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/#set-properties-and-events-in-xaml)
- [Handle the Events in the Code-Behind](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/#handle-the-events-in-the-code-behind)
- [Create the Editor in Code Instead](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/#create-the-editor-in-code-instead)
- [Next Steps](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/#next-steps)

---

## Nearby

- **Previous:** [Create a .NET Framework Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/dotnet-framework/llms.txt)
- **Next:** [Connect Rulers, Toolbars, and a Status Bar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/rulers-toolbars/llms.txt)
