Back to Devexpress

TdxCustomRibbon.ColorSchemeName Property

vcl-dxribbon-dot-tdxcustomribbon-43d75576.md

latest5.3 KB
Original Source

TdxCustomRibbon.ColorSchemeName Property

Specifies the name of the active built-in or common skin applied to the Ribbon control.

Declaration

delphi
property ColorSchemeName: string read; write;

Property Value

TypeDescription
string

The name of the active skin.

This property value automatically changes to the SkinName property value of a TdxSkinController component if global skin synchronization is enabled for the Ribbon control.

Refer to the Remarks section for detailed information on available options.

|

Remarks

A TdxRibbon control can automatically update its appearance settings from a TdxSkinController component that defines the active skin and palette application-wise ( recommended ).

If you need to apply different appearance settings to your Ribbon UI, set the UseGlobalSkin property to bFalse and use the ColorSchemeName property to apply a common[1] or built-in Ribbon skin ot the Ribbon control.

Built-in Ribbon Skins

The TdxRibbon control ships with the following unique skins for different Ribbon styles:

Office 365 | Office 2019Colorful | White | DarkGray | BlackOffice 2016Colorful | White | LightGray | MediumGray | DarkGrayOffice 2016 TabletColorfulOffice 2013White | LightGray | DarkGrayOffice 2010 | Office 2007Black | Blue | Silver

Color Accents

If one of the built-in Ribbon skins is active, you can use the ColorSchemeAccent property to switch between Microsoft Office-inspired color accents available for these skins.

Note

Color accents are available for the Office 2010[2] and newer Ribbon styles.

Code Example: Apply Individual Ribbon Skin and Color Accent

The following code example applies the built-in Colorful skin and its Green color accent to the Ribbon control in a TdxSpreadSheet control-based application that uses the WXI global skin and its Sharpness palette:

delphi
uses
  dxRibbon; // Declares the TdxRibbon class
// ...
procedure TMyForm.FormCreate(Sender: TObject);
begin
  DisableAero := True;
  dxRibbon1.BeginUpdate; // Initiates the following batch change
  try
    dxRibbon1.UseGlobalSkin := bFalse;
    dxRibbon1.Style := rsOffice365;
    dxRibbon1.ColorSchemeName := 'Colorful';
    dxRibbon1.ColorSchemeAccent := rcsaGreen;
  finally
    dxRibbon1.EndUpdate; // Calls EndUpdate regardless of the batch operation's success
  end;
end;
cpp
#include "dxRibbon.hpp" // Declares the TdxRibbon class
// ...
void __fastcall TMyForm::FormCreate(TObject *Sender)
{
  DisableAero = true;
  dxRibbon1->BeginUpdate(); // Initiates the following batch change
  try
  {
    dxRibbon1->UseGlobalSkin = bFalse;
    dxRibbon1->Style = rsOffice365;
    dxRibbon1->ColorSchemeName = "Colorful";
    dxRibbon1->ColorSchemeAccent = rcsaGreen;
  }
  __finally
  {
    dxRibbon1->EndUpdate(); // Calls EndUpdate regardless of the batch operation's success
  }
}

Footnotes

  1. You can apply skins from the same list available for the TdxSkinController component. Refer to the TcxCustomLookAndFeelController.SkinName property description for the full list of available common DevExpress skins.

  2. The active color accent affects only the Backstage View when the Office 2010 Ribbon style is selected. The color accent affects more UI elements in newer Ribbon styles.

See Also

TdxCustomRibbon.ColorSchemeAccent Property

TdxCustomRibbon.UseGlobalSkin Property

TcxCustomLookAndFeelController.SkinName Property

TdxCustomRibbon Class

TdxCustomRibbon Members

dxRibbon Unit