vcl-cxlookandfeels-dot-tcxcustomlookandfeelcontroller-76ab37d8.md
Specifies the name of the active color palette.
property SkinPaletteName: string read; write;
| Type | Description |
|---|---|
| string |
The name of the active color palette.
The property value is always sdxDefaultColorPaletteName for a bitmap-based skin. Only vector skins support multiple color schemes.
|
Use the SkinPaletteName property to switch between color schemes (palettes) available for the active vector skin.
Different vector skins ship with different sets of color palettes. To obtain the list of color palettes available for the active vector skin, you can call the PopulateSkinColorPalettes procedure. Assign a name from the populated name list to the SkinPaletteName property to apply the corresponding color palette to the active skin. If the assigned name is not on the list, the skin controller uses the default color palette.
Tip
You can use the Skin Editor to create custom color palettes for vector skins.
All SVG icons shipped with the DevExpress Icon Library include the following CSS style names that define corresponding SVG element colors: Red, Green, Blue, Yellow, Black, and White. DevExpress controls can use these CSS style names to apply the active vector skin palette to SVG glyphs to maintain contrast. You can disable or enable palette and glyph interaction application-wide or for individual UI glyphs and image lists.
The following class properties allow you to disable or enable palette interaction for SVG glyphs application-wide:
TdxVisualRefinements.UseDisabledSkinPaletteForSVGSpecifies if UI elements apply the active vector skin palette to disabled state glyphs at the application level.TdxVisualRefinements.UseEnabledSkinPaletteForSVGSpecifies if UI elements apply the active vector skin palette to enabled state glyphs at the application level.
Many UI elements allow you to load individual glyphs or assign glyphs stored in a TcxImageList component. You can use the following properties to explicitly enable or disable palette interaction for individual UI element glyphs or image lists:
TdxGPImage.UseDisabledSkinPaletteForSVGSpecifies if the active vector skin palette affects the stored SVG glyph for the disabled UI element state.TdxGPImage.UseEnabledSkinPaletteForSVGSpecifies if the active vector skin palette affects the stored SVG glyph for the enabled UI element state.TcxCustomImageList.UseDisabledSkinPaletteForSVGSpecifies if the active vector skin palette affects stored SVG glyphs for the disabled UI element state.TcxCustomImageList.UseEnabledSkinPaletteForSVGSpecifies if the active vector skin palette affects stored SVG glyphs for the enabled UI element state.
The following code example applies the WXICompact skin and its Sharpness palette to an application:
dxSkinController1.BeginUpdate;
try
dxSkinController1.UseSkins := True;
dxSkinController1.NativeStyle := False;
dxSkinController1.SkinName := 'WXICompact';
dxSkinController1.SkinPaletteName := 'Sharpness';
finally
dxSkinController1.EndUpdate;
end;
dxSkinController1->BeginUpdate();
try
{
dxSkinController1->UseSkins = true;
dxSkinController1->NativeStyle = false;
dxSkinController1->SkinName = "WXICompact";
dxSkinController1->SkinPaletteName = "Sharpness";
}
__finally
{
dxSkinController1->EndUpdate();
}
Alternatively, you can call the SetSkin procedure:
dxSkinController1.BeginUpdate;
try
dxSkinController1.NativeStyle := False;
dxSkinController1.SetSkin('WXICompact', 'Sharpness');
finally
dxSkinController1.EndUpdate;
end;
dxSkinController1->BeginUpdate();
try
{
dxSkinController1->NativeStyle = false;
dxSkinController1->SetSkin("WXICompact", "Sharpness");
}
__finally
{
dxSkinController1->EndUpdate();
}
The SkinPaletteName property’s default value is the sdxDefaultColorPaletteName global constant.
See Also
TcxCustomLookAndFeelController.SkinName Property
TcxCustomLookAndFeelController Class