# Document Editor

> Seven WPF tutorials for the TextControl editor: .NET and .NET Framework projects, XAML, button bar, ribbon tabs, sidebars, and opening and saving files.

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

---

In a WPF application, the editor of TX Text Control .NET for WPF is a control in the XAML of a window, and the toolbars, rulers, ribbon tabs and sidebars around it are controls as well. Seven tutorials build such a window step by step: first with the toolbox and a button bar, then in XAML alone, with a ribbon and sidebars, and finally with commands that open and save documents. After them, you know how the controls are declared, how they find each other by name, and where the startup code of the editor belongs.

### Choose a Tutorial

| Tutorial | You build | Done in |
|---|---|---|
| [Create Your First WPF Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/first-application/llms-full.txt) | A .NET project with the NuGet package, the editor, a button bar, two rulers and a status bar | Toolbox, **Properties** window, one handler |
| [Create a .NET Framework Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/dotnet-framework/llms-full.txt) | The same editor in a .NET Framework 4.8 project, with a menu for files, the clipboard and formatting | Toolbox and code |
| [Add TextControl in XAML](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/llms-full.txt) | The editor declared in XAML, with properties, events and a data binding, or created in code | XAML and code |
| [Connect Rulers, Toolbars, and a Status Bar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/rulers-toolbars/llms-full.txt) | The bars connected in XAML or code, with your choice of buttons and status information | XAML and code |
| [Create a WPF Ribbon Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/ribbon/llms-full.txt) | A `RibbonWindow` with the ribbon tabs of TX Text Control and a contextual **Table Tools** tab | XAML and code |
| [Add a Sidebar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/sidebar/llms-full.txt) | A sidebar that ribbon buttons open with styles, comments or search panels | XAML and code |
| [Load and Save Documents](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/load-save/llms-full.txt) | New, Open, Save and Save As with a prompt for unsaved changes, in a menu or the ribbon | Code |

### How the Controls Work Together

Every tutorial relies on the same few rules, which the pages explain where they are first needed:

- **One XAML namespace.** The controls are in the namespace `TXTextControl.WPF` of the assembly *TXTextControl.WPF*, declared once in the `Window` element with a prefix such as `WPF`.
- **Connections by name.** The `TextControl` finds its button bar, rulers, status bar and ribbon tabs through string properties that hold their names, and a sidebar finds the editor the same way.
- **Layout by the panel.** A `DockPanel` places the bars at the sides of the window in the order of the XAML, and the `TextControl`, added last, fills the rest.
- **Startup code in Loaded.** Code that works with the document runs in the `Loaded` event of the `TextControl`, when the editor is ready.

### Where to Start

1. Start with [Create Your First WPF Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/first-application/llms-full.txt), or with [Create a .NET Framework Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/dotnet-framework/llms-full.txt) if your application runs on the .NET Framework.
2. Read [Add TextControl in XAML](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/llms-full.txt) to understand the XAML the toolbox wrote.
3. Decide on the user interface: a button bar, as in [Connect Rulers, Toolbars, and a Status Bar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/rulers-toolbars/llms-full.txt), or a ribbon with sidebars, as in [Create a WPF Ribbon Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/ribbon/llms-full.txt) and [Add a Sidebar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/sidebar/llms-full.txt).
4. Add [Load and Save Documents](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/load-save/llms-full.txt), so that users can work with their files.

Before you start, install the setup of TX Text Control .NET for WPF on your development machine. It provides the NuGet package source, the toolbox tab and the XAML Designer support. See [Installing the Product](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/installation/setup/llms-full.txt).

### After These Tutorials

- [Document Processing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/llms-full.txt): build, convert and print documents in code.
- [Mail Merge](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/mail-merge/llms-full.txt): fill templates with data.
- [Document Editor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/document-editor/llms-full.txt): every feature of the editor in detail.
- [Integration Guide](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/integration/llms-full.txt): data binding, MVVM, commands and layout in WPF applications.

---

## In This Section

- [Create a .NET Framework Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/dotnet-framework/llms-full.txt): Build the Simple sample in a WPF App (.NET Framework) project: TextControl, bars and a menu for files, clipboard and font dialogs, licensed with licenses.licx.
- [Create Your First WPF Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/first-application/llms-full.txt): Create a WPF Application in Visual Studio, add TXTextControl.TextControl.WPF.SDK and add a TextControl with ButtonBar, RulerBar and StatusBar in a DockPanel.
- [Load and Save Documents](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/load-save/llms-full.txt): Add New, Open, Save and Save As to a WPF window or ribbon menu with TextControl.Load and Save, LoadSettings, SaveSettings, byte arrays and a save prompt.
- [Create a WPF Ribbon Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/ribbon/llms-full.txt): Turn MainWindow into a RibbonWindow, add RibbonFormattingTab, RibbonInsertTab and other TX Text Control tabs in XAML, and show a Table Tools contextual tab.
- [Connect Rulers, Toolbars, and a Status Bar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/rulers-toolbars/llms-full.txt): Connect ButtonBar, RulerBar and StatusBar to a WPF TextControl by name in XAML or code, remove ButtonBarItem buttons and set ScaleUnit and status bar areas.
- [Add a Sidebar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/sidebar/llms-full.txt): Dock a Sidebar beside the WPF editor, open Styles, Find, Comments and Tracked Changes panels from ribbon buttons, pin it or show a custom control inside it.
- [Add TextControl in XAML](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/xaml/llms-full.txt): Declare the TXTextControl.WPF namespace, add a TextControl in XAML, set ViewMode and DisplayColors, bind ZoomFactor, handle Loaded and Changed, or use code.

---

## Nearby

- **Previous:** [Getting Started](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/llms-full.txt)
- **Next:** [Create Your First WPF Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/first-application/llms-full.txt)
