Override Syncfusion Themes in WPF SkinStorage (Classic)

19 Oct 20221 minute to read

All Syncfusion styles can be overridden by a common Naming Convention. A unique key is given to each and every style, so that you can override the styles using the BasedOn property.

Naming Convention of a key


Example: ShinyRedCalendarEditStyle

The following steps explain how to override the Syncfusion Themes.

  1. Add the corresponding resource dictionary in the sample.

    <ResourceDictionary Source="/Syncfusion.Shared.WPF;Component/Controls/Calendar/themes/ShinyRedStyle.xaml"/>
  2. Define the new style using the BasedOn property.

    The following code snippet overrides the Syncfusion style for the Calendar Control.

    <Style x:Key="CalendarEditStyle" TargetType="syncfusion:CalendarEdit" BasedOn="{StaticResource ShinyRedCalendarEditStyle}" >
    <Setter Property="Foreground" Value="Blue"/>
    <Setter Property="HeaderForeground" Value="Blue"/>
    <syncfusion:CalendarEdit Name="calendar" Style="{StaticResource CalendarEditStyle}"></syncfusion:CalendarEdit>        

The output is displayed as shown below.

Override syncfusion themes