This example illustrates how to support default Color Schemes (Generic and Win8) in a custom control. In this implementation, a CustomRibbonItem control uses colors defined for the default Color Schemes and changes its appearance according to the current Color Scheme.
All the required colors for different Color Schemes should be defined within a separate ResourceDictionary file. To use these colors in styles or templates declared within a certain ResourceDictionary, include the dictionary with colors into the MergedDictionaries collection of the target ResourceDictionary by using the ColorSchemeDictionary class and its Source property.
↧
How to support default Color Schemes in a custom control
↧