Feb 20, 2014 at 1:10 PM
Edited Feb 20, 2014 at 1:16 PM
Simple question but not sure if the answer will be simple.
I want to change the fluent ribbon themes at runtime. I was trying to change the theme from black to blue.
So i set the initial theme to black. It is applied correctly and fluent ribbon shows with black theme.
Then on click of a button handler(not MVVM but only for testing), i do:
ResourceDictionary rrd = new ResourceDictionary();
rrd.Source = new Uri("pack://application:,,,/Fluent;Component/Themes/office2010/blue.xaml");
foreach (ResourceDictionary res in Application.Current.Resources.MergedDictionaries)
if (res.Source != null)
string source = res.Source.ToString();
This approach of switching the themes at runtime works with avalon dock but with fluent ribbon, the initial black theme disappears and then no new theme gets applied.
Any help will be greatly appreciated.