Back to Devexpress

UserLookAndFeel.ActiveSvgPaletteName Property

windowsforms-devexpress-dot-lookandfeel-dot-userlookandfeel-fe420874.md

latest4.1 KB
Original Source

UserLookAndFeel.ActiveSvgPaletteName Property

Returns the name of the currently applied swatch.

Namespace : DevExpress.LookAndFeel

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
[Browsable(false)]
public virtual string ActiveSvgPaletteName { get; }
vb
<Browsable(False)>
Public Overridable ReadOnly Property ActiveSvgPaletteName As String

Property Value

TypeDescription
String

A String value that is the swatch name.

|

Remarks

You can apply color presets, aka swatches, by calling the UserLookAndFeel.SetSkinStyle method.

csharp
defaultLookAndFeel1.LookAndFeel.SetSkinStyle(SkinSvgPalette.Bezier.NorwegianWood);
vb
defaultLookAndFeel1.LookAndFeel.SetSkinStyle(SkinSvgPalette.Bezier.NorwegianWood)

The ActiveSvgPaletteName member returns the human-friendly swatch name with space between separate words. For the code above, the returned string is “Norwegian Wood”.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ActiveSvgPaletteName property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-save-restore-active-skin-palette/CS/DXApplication1/Form1.cs#L37

csharp
settings.SkinName = UserLookAndFeel.Default.SkinName;
settings.Palette = UserLookAndFeel.Default.ActiveSvgPaletteName;
settings.CompactMode = UserLookAndFeel.Default.CompactUIModeForced;

winforms-generate-skin-palettes-with-ai/CS/DevExpress.AI.WinForms.AIGeneratePalette/UI/GeneratePaletteUIViewModel.cs#L123

csharp
// Persist the original AI textual response.
AIPaletteRepository.Default.Palettes.Add(new AIPaletteEntry(current.Response.Response, UserLookAndFeel.Default.ActiveSvgPaletteName, commonSkin.Name, aiPaletteName));
commonSkin.CustomSvgPalettes.Add(new SvgPaletteKey(commonSkin.CustomSvgPalettes.Count, aiPaletteName), current.Response.Result);

winforms-save-restore-active-skin-palette/VB/DXApplication1/Form1.vb#L32

vb
settings.SkinName = UserLookAndFeel.Default.SkinName
settings.Palette = UserLookAndFeel.Default.ActiveSvgPaletteName
settings.CompactMode = UserLookAndFeel.Default.CompactUIModeForced

See Also

SetSkinStyle

WinForms Skins and Color Palettes

UserLookAndFeel Class

UserLookAndFeel Members

DevExpress.LookAndFeel Namespace