Search code examples
wpfc#-4.0ribbon

Applying Office2007 theme on RibbonBar on WPF


I downloaded Microsoft Ribbon for WPF. I installed it, and as expected, it is Awesome.

But when I'm trying to change the theme with the following code, VS claims that he cannot find the file.

<ribbon:RibbonWindow.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Black.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</ribbon:RibbonWindow.Resources>

Error   1   An error occurred while finding the resource dictionary "/RibbonControlsLibrary;component/Themes/Office2007Black.xaml". C:\Users\Gilad\AppData\Local\Temporary Projects\GameofLife\MainWindow.xaml  11  17  GameofLife

What can I do?


Solution

  • Neither Office2007Blue.xaml nor Office2007Black.xaml get shipped with the Ribbon control anymore, if you want to change its style you have to write your own style.