TX Text Control .NET for Windows Forms

Ribbon Class

Class|Introduced in 24.0
Namespace
TXTextControl.Windows.Forms.Ribbon
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Windows.Forms.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.Windows.Forms.dll from the setup.
Inherits
  1. TabControl
  2. Ribbon

Description

The Ribbon class is a command bar that organizes the features of an application into a series of tabs at the top of the application window. It replaces both the traditional menu bar and toolbars. It hosts an Application Menu, and one or more RibbonTab controls. These controls then host a variety of button and menu controls that enable access to application commands. To add or remove objects of type RibbonTab it is recommended to use the Ribbon's Controls property. The Ribbon class is inherited from the System.Windows.Forms.TabControl class. The following describes only the properties, methods and events defined through the Ribbon class. For a list of properties, methods and events inherited from the System.Windows.Forms.TabControl class see the .NET Framework reference. A ribbon can be connected with a TextControl through the TextControl.Ribbon property.

Syntax

public class Ribbon : TabControl

Examples

The following example creates a Ribbon instance and configures its minimized setting for a document workflow.

using TXTextControl.Windows.Forms.Ribbon.Ribbon ribbon = new();
ribbon.Minimized = true;

Members

Constructors

ConstructorDescription
RibbonInitializes a new instance of the Ribbon class.

Properties

PropertyDescription
ApplicationMenuHelpPaneItemsGets a collection of all items which are displayed on the help pane of the Application Menu. The Application Menu has a help pane that can host additional content and is typically used to display a list of recent documents. The collection can be used to add or remove items and to set item properties. The property value is an object of the type Windows.Forms.Ribbon.RibbonItemCollection.
ApplicationMenuItemsGets a collection of all items which are displayed on the Application Menu. Every ribbon includes an Application Menu as the first tab in the ribbon. Other ribbon tabs contain controls for working with the document content. In contrast, the Application Menu presents a menu of commands for working with the file. The collection can be used to add or remove items and to set item properties. The property value is an object of the type Windows.Forms.Ribbon.RibbonItemCollection.
ContextualTabGroupsGets a collection of all contextual tab groups of this ribbon. The collection can be used to add or remove items and to set item properties. The property value is an object of the type Windows.Forms.Ribbon.ContextualTabGroupCollection
DisplayColorsGets or sets the colors of the ribbon. The property value is an object of the type Windows.Forms.Ribbon.Ribbon.Colors.
HasApplicationMenuGets or sets a value defining whether the first tab of the ribbon is an application menu.
MinimizedGets or sets a value determining whether the ribbon is shown minimized.
ReadOnlyGets or sets a value determining the ribbon's read only mode. When the ribbon is set to read only, it still shows all formatting attributes of the connected TextControl, but formatting attributes cannot be changed.

Methods

MethodDescription
ResetDisplayColorsNot described in the reference. public void ResetDisplayColors();