Ribbon and UI
Which commands do your users need, and where should they find them? TX Text Control .NET for WPF answers with a set of XAML elements around the TextControl: ribbon tabs for Microsoft's WPF Ribbon, a button bar, mini toolbars, rulers, a status bar, sidebars, context menus and dialog boxes. Declaring and connecting them in XAML, the contents of each tab, commands of your own, and styling, translation and right-to-left mirroring each have a page of their own.

How the Parts Fit Together
All elements are in the namespace TXTextControl.WPF, which the XAML maps to the prefix WPF, as the Visual Studio toolbox writes it. They find each other by name: the TextControl stores the x:Name of each ribbon tab, ruler, status bar and button bar it works with, the ribbon tabs store the names of the sidebars their buttons open, and a sidebar stores the name of its TextControl.
| Element | What users do with it |
|---|---|
RibbonFormattingTab and eleven more tabs, in a WPF Ribbon | All commands of the editor, grouped in tabs |
ButtonBar | Font and paragraph formatting in a WPF ToolBar |
TextMiniToolbar, ObjectMiniToolbar | Quick formatting next to the selection |
RulerBar, StatusBar | Margins, indents and tabs; page, line and zoom information |
Sidebar | Panels for find and replace, styles, comments, tracked changes, fields and document settings |
The ribbon itself, the application menu and the Quick Access Toolbar are WPF classes from System.Windows.Controls.Ribbon; TX Text Control provides the tabs. Ribbon Tabs, Toolbars, Rulers, and Status Bar introduces each element.
Find the Right Page
| If you want to | Read |
|---|---|
| Know which ribbon tab contains which commands, and change or remove them | Built-in Ribbon Tabs |
| Declare the ribbon in XAML and connect its tabs to the editor | Connecting Ribbon Tabs in XAML |
| Add tabs, groups and buttons of your own, fill the application menu | Custom Tabs and Commands |
| Use a button bar, or show mini toolbars | Toolbars and Mini Toolbars |
| Set the scale unit of the rulers or the areas of the status bar | Rulers and Status Bar |
| Open panels such as find, styles or comments beside the document | Sidebar and Panels |
| Change the menu that opens with the right mouse button | Context Menus |
| Open the dialog boxes for fonts, paragraphs, tables and more | Built-in Dialog Boxes |
| Style the elements and match them to your application | Styles, Resources, and Themes |
| Show the interface in another language | Localization and Resource Kit |
| Build an interface for Arabic or Hebrew | Right-to-Left UI |
Where to Start
- Build a first editor with Create a WPF Ribbon Application or, without a ribbon, Connect Rulers, Toolbars, and a Status Bar.
- Read Connecting Ribbon Tabs in XAML to understand the connections by name.
- Choose the tabs your users need in Built-in Ribbon Tabs, and add your own commands with Custom Tabs and Commands.
- Look at the TX Words Sample Application, which combines all elements in one window.
Pages in This Section
- Built-in Ribbon Tabs: the twelve predefined tabs, their item names, and changing or removing items, groups and tabs.
- Connecting Ribbon Tabs in XAML: the ribbon window, the connection properties and a complete XAML example.
- Custom Tabs and Commands: tabs and buttons of your own, built-in icons, the application menu and the Quick Access Toolbar.
- Toolbars and Mini Toolbars: the button bar and the contextual mini toolbars.
- Rulers and Status Bar: scale units, page margins, cell references and the areas of the status bar.
- Sidebar and Panels: layouts, ribbon connections, dialog mode and the elements of the panels.
- Context Menus: the menus that open with the right mouse button.
- Built-in Dialog Boxes: the dialogs of the
TextControland how to open them. - Styles, Resources, and Themes: WPF styles, resources and colors of the elements.
- Localization and Resource Kit: texts of the interface in other languages.
- Right-to-Left UI: the elements in right-to-left applications.