Ribbon Tabs, Toolbars, Rulers, and Status Bar
Around a TextControl in a WPF window you place ready-made controls that give users commands and feedback: ribbon tabs for the Microsoft WPF ribbon or a button bar, the mini toolbars that pop up next to the text, horizontal and vertical ruler bars, and a status bar. Each one is introduced below with what it shows, how it is connected to the editor and where the Document Editor section describes it in detail. For how all parts of an application fit together, see Product Architecture.
Ribbon Tabs or a Button Bar
Users get their commands from one of two interfaces:
| Ribbon tabs | ButtonBar | |
|---|---|---|
| What users see | Tabs of command groups at the top of the window, in a Ribbon from Microsoft's System.Windows.Controls.Ribbon assembly | One tool bar with character and paragraph formatting |
| What it covers | The features of the editor, spread over twelve predefined tabs | Styles, font, size, zoom, bold, italic, alignment, indents, lists and more |
| Editions | Enterprise and Professional | Enterprise, Professional and Standard |
The rulers and the status bar work with either one. The ribbon sample of TX Words shows the tabs without a button bar. Editions and Feature Availability lists what each edition includes.
The Ribbon Tabs
TX Text Control .NET for WPF provides ribbon tabs, not a ribbon control. Each predefined tab is derived from System.Windows.Controls.Ribbon.RibbonTab and is hosted in a System.Windows.Controls.Ribbon.Ribbon, Microsoft's ribbon for WPF:
| Tab | For |
|---|---|
| RibbonFormattingTab | Character and paragraph attributes, formatting styles, the clipboard and search |
| RibbonInsertTab | Pages, tables, images, hyperlinks, bookmarks, headers and footers, text frames and symbols |
| RibbonPageLayoutTab | Page setup and layout |
| RibbonViewTab | View settings, and showing and hiding the rulers and the status bar |
| RibbonReferencesTab | Footnotes and tables of contents |
| RibbonProofingTab | Spelling, hyphenation, language, comments and tracked changes |
| RibbonPermissionsTab | What users may change in a protected document |
| RibbonFormFieldsTab | Inserting and editing form fields |
| RibbonReportingTab | Mail merge and reporting templates |
| RibbonTableLayoutTab | Tables |
| RibbonFormulaTab | Formulas in table cells |
| RibbonFrameLayoutTab | Images, text frames, drawings and barcodes |
The Predefined Tabs lists the groups of each tab.
- Connection. A tab controls a
TextControlwhen the editor names it in a string property of the same name, such as RibbonFormattingTab. Connecting Ribbon Tabs in XAML connects all of them in one window. - Items and contextual tabs. Every item of a tab has a name from the tab's
RibbonItemenumeration, with which you change, move or remove it, and the table and frame tabs can appear only in their context. See Built-in Ribbon Tabs. - Your own tabs and commands. Tabs of your own, the application menu and the Quick Access Toolbar are built from Microsoft's ribbon classes, and ResourceProvider gives your buttons the icons and texts of the built-in items. See Custom Tabs and Commands.
ButtonBar
The ButtonBar is a System.Windows.Controls.ToolBar that shows and sets the character and paragraph attributes of the connected editor, which names it in its ButtonBar property. Its 24 buttons and combo boxes are items of its Items collection, where you sort, remove or add items in code. The Button Bar lists the items and shows how to change them.
Mini Toolbars
A mini toolbar is a small popup with the formatting commands of the current context: the TextMiniToolbar for text and tables, and the ObjectMiniToolbar for text frames, drawings and barcodes. They need no item in the toolbox: ShowMiniToolbar of the TextControl turns them on. Mini Toolbars describes when each one opens and how you change its items.
RulerBar
A RulerBar shows and sets indents, page margins and tabs. A window usually has two of them, connected through RulerBar and VerticalRulerBar of the editor. Ruler Settings describes the scale, the page margins, the cell references in tables and the border styles.
StatusBar
The StatusBar shows the input position, the page, the section, the language, the key states and the zoom factor, and the editor names it in its StatusBar property. Like RulerBar, it is derived from TextControlToolBar. Status Bar Settings lists the properties that choose its areas and set their labels.
Next Steps
- Connect Rulers, Toolbars, and a Status Bar — build an editor with a button bar, rulers and a status bar.
- Create a WPF Ribbon Application — put the ribbon tabs into a
Ribbonand connect them. - Ribbon and UI — the tabs, mini toolbars, dialog boxes, themes and localization in detail.
- Sidebar — the panels that several ribbon buttons open.