Resource ID for Syncfusion Themes in WPF SkinStorage (Classic)

4 May 20211 minute to read

The WPF Skin Manager provides a swatch of theme colors that contains all Syncfusion theme brushes. These brushes are used by getting key names for the given particular theme. Brush names are stored as properties in the ThemeColors class.

NOTE

ThemeColors class has been referred at application level by adding Syncfusion.Shared.WPF assembly.

Use case scenarios

Users can customize brushes easily to get unique colors for all controls in the application.

Properties

Property Description Type Data Type
BackgroundBrush Gets the background color of the control CLR String
HoverBrush Gets the mouse hover color of the control CLR String
SelectedBrush Gets the foreground color of selected control CLR String
BorderBrush Gets the border color of the control CLR String
Foreground Gets the foreground color of text CLR String
ActiveWindowTitleBrush Gets the background color of active window header CLR String
InActiveWindowTitleBrush Gets the background color of inactive window header CLR String
RibbonPanelBrush Gets the background color of the ribbon panel CLR String
MenuBackgroundBrush Gets the background color of Menu CLR String
MenuHoverBrush Gets the mouse hover color of the MenuItem CLR String
GalleryHeaderSelectedBrush Gets the foreground color of selected GalleryHeader CLR String
TrackBrush Gets the background color of scrollbar track CLR String
HorizontalThumbBrush Gets the background color of horizontal thumb CLR String
VerticalThumbBrush Gets the background color of vertical thumb CLR String
HorizontalThumbHoverBrush Gets the background color of the horizontal thumb when mouse is hovered CLR String
VerticalThumbHoverBrush Gets the background color of the vertical thumb when mouse is hovered CLR String
HorizontalThumbPressedBrush Gets the background color of pressed horizontal thumb CLR String
VerticalThumbPressedBrush Gets the background color of pressed vertical thumb CLR String
ColumnHeaderBrush Gets the background color of column header CLR String
TabHoverBrush Gets the background color of hovered TabItem CLR String
TabHoverBorderBrush Gets the border color of hovered TabItem CLR String
CardViewGroupingBarBrush Gets the background color of the CardView grouping header CLR String

Adding resource ID to an application

Setting through XAML

The following code snippet explains how to set the Resource ID through XAML

  1. Add the VisualStyle in the sample.
syncfusion:SkinStorage.VisualStyle="Office2013"
  1. Set Resource ID as shown below.
<Grid x:Name="grid" Background="{DynamicResource {x:Static syncfusion:ThemeColors.BackgroundBrush}}">

Setting through C#

SkinStorage.SetVisualStyle(this, "Office2013");
grid.SetResourceReference(BackgroundProperty, ThemeColors.BackgroundBrush);