# Product Architecture

> How TextControl, the ribbon, toolbars, rulers, status bar and sidebar connect, where ServerTextControl and MailMerge fit, and what the engine consists of.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for Windows Forms > Overview > Product Architecture
- **1801 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/architecture/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/architecture/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/architecture/llms-full.txt

---

Every Windows Forms application with TX Text Control has the `TextControl` at its center. The ribbon, the toolbars, the rulers, the status bar and the sidebar are separate controls that you connect to it, `MailMerge` and `ServerTextControl` work with documents in code, and one document engine does the work for all of them. Once you know how these parts connect, you know what to place on a form, what to set in code and which files your application ships.

### Architecture at a Glance

The parts of TX Text Control .NET for Windows Forms fall into three layers:

- **The editor and its user interface.** `TextControl` shows and edits the document. The ribbon, the toolbars, the rulers, the status bar and the sidebar are controls of their own that display and change the attributes of the connected `TextControl`.
- **The components without a user interface.** `ServerTextControl` processes documents in code, and `MailMerge` merges data into templates. They can work with a `TextControl` or on their own.
- **The document engine.** .NET assemblies and native Windows libraries load, format, render, print and save the documents for all components.

The following diagram shows one form with a complete editor and the components your code uses beside it:

```text
Form
+--------------------------------------------------------------+
| Ribbon  (tabs: Formatting, Insert, Page Layout, View, ...)   |
+---------+------------------------------------+---------------+
|         | RulerBar                           |               |
| Vertical|------------------------------------|   Sidebar     |
| RulerBar| TextControl                        |               |
|         |                                    |               |
+---------+------------------------------------+---------------+
| StatusBar                                                    |
+--------------------------------------------------------------+

MailMerge --TextComponent--> TextControl or ServerTextControl

TX Text Control engine: .NET assemblies + native libraries (win-x64, win-x86)
```

### TextControl and Its Bars

`TextControl`, `ButtonBar`, `RulerBar` and `StatusBar` are Windows Forms controls, derived from `System.Windows.Forms.Control`. The bars do nothing on their own: each one is connected to a `TextControl` through a property of the `TextControl`.

| Property of `TextControl` | Connects |
|---|---|
| [ButtonBar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/buttonbar-property/llms-full.txt) | A `ButtonBar`, which shows and sets font and paragraph attributes |
| [RulerBar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/rulerbar-property/llms-full.txt) | The horizontal `RulerBar`, which shows and sets indents, margins and tabs |
| [VerticalRulerBar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/verticalrulerbar-property/llms-full.txt) | A second `RulerBar`, shown vertically beside the editor |
| [StatusBar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/statusbar-property/llms-full.txt) | A `StatusBar`, which shows the input position, the section and the page |
| [Ribbon](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/ribbon-property/llms-full.txt) | A `Ribbon`, which replaces the menu bar and the toolbars |

In the Visual Studio designer, the smart tag of the `TextControl` adds the bars and connects them without code; [Visual Studio Designer Integration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/integration/designer/llms-full.txt) describes it. In code, you assign the bars to these properties, for example in the constructor of the form, as [Connect the Controls in Code](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/document-editor/rulers-toolbars/#connect-the-controls-in-code) shows. A property that is not set is `null`, and the editor works without that bar.

#### Ribbon Tabs and the Sidebar

The ribbon hosts tabs, and TX Text Control provides predefined ones for all features of the editor, such as [RibbonFormattingTab](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonformattingtab/llms-full.txt) and [RibbonReportingTab](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonreportingtab/llms-full.txt). A predefined tab controls a `TextControl` only when that `TextControl` is connected to the ribbon that hosts the tab. [Built-in Ribbon Tabs](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/document-editor/ribbon-ui/ribbon/llms-full.txt) lists them, with what some of them need in addition, such as a spell checker for the proofing tab.

The [Sidebar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms/sidebar/llms-full.txt) is connected the other way around: its own [TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms/sidebar/textcontrol-property/llms-full.txt) property names the editor it works with, and ribbon buttons can open it. See [Sidebar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/components/sidebar/llms-full.txt).

### ServerTextControl and MailMerge

[ServerTextControl](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/llms-full.txt) is a component, not a control. It has the same programming interface as `TextControl` but no window, so it suits work that the user does not watch. Unlike `TextControl`, it has to be initialized with [Create](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/create-method/llms-full.txt) before you use any other member.

[MailMerge](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/mailmerge/llms-full.txt) in the `TXTextControl.DocumentServer` namespace merges data into templates. It holds no document itself: its [TextComponent](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/mailmerge/textcomponent-property/llms-full.txt) property connects it to a `TextControl`, where the user sees the merged result, or to a `ServerTextControl`, which merges in the background.

[ServerTextControl](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/components/servertextcontrol/llms-full.txt) and [MailMerge](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/components/mailmerge/llms-full.txt) introduce the two components.

### The Document Engine

All components use the same engine. It consists of .NET assemblies and native Windows libraries.

- **The .NET assemblies** hold the classes. *TXTextControl.Windows.Forms.dll* contains `TextControl`, the bars, the ribbon and the sidebar, *TXTextControl.Server.dll* contains `ServerTextControl`, and *TXDocumentServer.dll* contains `MailMerge`. Further assemblies add barcodes, drawings, PDF and images.
- **The native libraries** format and render the documents and read and write the file formats, with one library per format family. They exist in a 32-bit and a 64-bit version; [32-bit and 64-bit Applications](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/requirements/32-bit-64-bit/#why-bitness-matters) shows where each set is.
- **Windows components.** The native libraries need the Microsoft Visual C++ runtime, and the XML features the Microsoft XML parser, as [Windows Versions](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/requirements/windows/#windows-components) describes.

Because the native libraries are built for 32-bit and 64-bit Windows, the bitness of your application decides which set it loads, and an application built as AnyCPU needs the set that matches the process. [x86, x64, and AnyCPU](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/x86-x64-anycpu/llms-full.txt) explains the build settings, and [Managed Assemblies and Native Libraries](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/assemblies/llms-full.txt) lists the files you ship.

#### Formatting, Dialog Boxes and Printing

The engine formats a document with the text dimensions of a printer, so that it looks the same on the screen and on paper; [One Engine for Display and Printing](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/document-editor/architecture/#one-engine-for-display-and-printing) explains the setting. The dialog boxes are built in and are opened by methods of `TextControl`, as [Built-in Dialog Boxes](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/document-editor/ribbon-ui/dialog-boxes/llms-full.txt) describes, and printing uses the print dialog and the printers of Windows, as [Printing and Print Preview](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/document-editor/printing/llms-full.txt) describes.

### Next Steps

- [Components](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/components/llms-full.txt): each control and component with its key members.
- [Supported Platforms](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/platforms/llms-full.txt): the .NET and Windows versions and the processor architectures.
- [Create a Ribbon Application with Sidebar Support](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/document-editor/ribbon-sidebar/llms-full.txt): put the ribbon, the rulers, the status bar and the sidebar on a form.
- [Deployment Guide](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/llms-full.txt): the files your application ships and how to publish it.

---

## Nearby

- **Previous:** [Introduction](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/introduction/llms-full.txt)
- **Next:** [Components](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/components/llms-full.txt)
