Colors Class
- Namespace
TXTextControl.Windows. Forms. Ribbon
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WinForms. SDK
- Assembly
TXTextControl.Windows. Forms. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WinForms. SDK TXTextControl.from the setup.Windows. Forms. dll
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.ColorsPublic NotInheritable Class Ribbon.ColorsExamples
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;Dim colors As New TXTextControl.Windows.Forms.Ribbon.Ribbon.Colors()
colors.TabColor = System.Drawing.Color.LightSteelBlueMembers
Constructors
| Constructor | Description |
|---|---|
| Colors | Initializes 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
| Property | Description |
|---|---|
| ApplicationMenuColor | Gets or sets the background color of a ribbon's application menu. |
| ApplicationMenuTabColor | Gets or sets the color of a ribbon's first tab, which opens the application menu. |
| ApplicationMenuTabHighlightColor | Gets or sets the highlight color of a ribbon's first tab which is used, when the mouse pointer is moved over it. |
| HighlightTabColor | Gets or sets the highlight color of a ribbon tab which is used when a tab is selected. |
| MenuColor | Gets or sets the menu color of a ribbon. |
| TabColor | Gets or sets the background color of a ribbon tab. |
Methods
| Method | Description |
|---|---|
| ResetApplicationMenuColor | Resets the ribbon's ApplicationMenuColor to its system dependent default value. |
| ResetApplicationMenuTabColor | Resets the ribbon's ApplicationMenuTabColor to its system dependent default value. |
| ResetApplicationMenuTabHighlightColor | Resets the ribbon's ApplicationMenuTabHighlightColor to its system dependent default value. |
| ResetHighlightTabColor | Resets the ribbon's HighlightTabColor to its system dependent default value. |
| ResetMenuColor | Resets the ribbon's MenuColor to its system dependent default value. |
| ResetTabColor | Resets the ribbon's TabColor to its system dependent default value. |