TX Text Control .NET for Windows Forms

Colors 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.

Description

The Ribbon.Colors class gets, sets or resets the display colors of a Windows Forms Ribbon control. By default the display colors depend on sytem colors. With this class all colors can be individually designed.

Syntax

public sealed class Ribbon.Colors

Examples

The following example creates a Colors instance and configures its tab color setting for a document workflow.

TXTextControl.Windows.Forms.Ribbon.Ribbon.Colors colors = new();
colors.TabColor = System.Drawing.Color.LightSteelBlue;

Members

Constructors

ConstructorDescription
ColorsInitializes a new instance of the Ribbon.Colors class. After creating the object with this constuctor, individual colors can be set. If the Colors object is assigned to the Windows.Forms.Ribbon.Ribbon.DisplayColors property, non-set colors are reset to their system dependent default values.

Properties

PropertyDescription
ApplicationMenuColorGets or sets the background color of a ribbon's application menu.
ApplicationMenuTabColorGets or sets the color of a ribbon's first tab, which opens the application menu.
ApplicationMenuTabHighlightColorGets or sets the highlight color of a ribbon's first tab which is used, when the mouse pointer is moved over it.
HighlightTabColorGets or sets the highlight color of a ribbon tab which is used when a tab is selected.
MenuColorGets or sets the menu color of a ribbon.
TabColorGets or sets the background color of a ribbon tab.

Methods

MethodDescription
ResetApplicationMenuColorResets the ribbon's ApplicationMenuColor to its system dependent default value.
ResetApplicationMenuTabColorResets the ribbon's ApplicationMenuTabColor to its system dependent default value.
ResetApplicationMenuTabHighlightColorResets the ribbon's ApplicationMenuTabHighlightColor to its system dependent default value.
ResetHighlightTabColorResets the ribbon's HighlightTabColor to its system dependent default value.
ResetMenuColorResets the ribbon's MenuColor to its system dependent default value.
ResetTabColorResets the ribbon's TabColor to its system dependent default value.