TX Text Control .NET for WPF

Ribbon Tabs, Toolbars, Rulers, and Status Bar

Topic

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 tabsButtonBar
What users seeTabs of command groups at the top of the window, in a Ribbon from Microsoft's System.Windows.Controls.Ribbon assemblyOne tool bar with character and paragraph formatting
What it coversThe features of the editor, spread over twelve predefined tabsStyles, font, size, zoom, bold, italic, alignment, indents, lists and more
EditionsEnterprise and ProfessionalEnterprise, 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:

TabFor
RibbonFormattingTabCharacter and paragraph attributes, formatting styles, the clipboard and search
RibbonInsertTabPages, tables, images, hyperlinks, bookmarks, headers and footers, text frames and symbols
RibbonPageLayoutTabPage setup and layout
RibbonViewTabView settings, and showing and hiding the rulers and the status bar
RibbonReferencesTabFootnotes and tables of contents
RibbonProofingTabSpelling, hyphenation, language, comments and tracked changes
RibbonPermissionsTabWhat users may change in a protected document
RibbonFormFieldsTabInserting and editing form fields
RibbonReportingTabMail merge and reporting templates
RibbonTableLayoutTabTables
RibbonFormulaTabFormulas in table cells
RibbonFrameLayoutTabImages, text frames, drawings and barcodes

The Predefined Tabs lists the groups of each tab.

  • Connection. A tab controls a TextControl when 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 RibbonItem enumeration, 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