Search code examples
wpfxamlthemesribbon-controlribboncontrolslibrary

WPF: Custom Theme for RibbonControlLibrary


I am using RibbonControlLibrary by Microsoft. It has three predefined themes and one can use them by

<ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Black.xaml"/>
or
<ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Blue.xaml"/>
or
<ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Silver.xaml"/>

How can i define my own custom theme for this Ribbon? Is there any custom theme available?


Solution

  • While I checked the RibbonCntrolsLibrary.dll with reflector, I saw the themes files for RibbonControl in the resources but these were .baml files. So here I found a baml to xaml converter: BamlViewer. I downloaded this dll file and added it into my reflector, now I am able to convert the content of .baml file into xaml. Here you get the pre-defined theme for RibbonControl, Now using this you can easily define your own theme and assign it to RibbonControl(don't forget to use the same keys for styles as in the default theme).