When I programmically change the Theme of the xamRibbon menu (using Theme="Office2k7Blue" for example) i am no longer to see the dropdown menus of the MenuTool buttons that I have in the ribbon.
The ToggleButtonTool based buttons still work as expected, just missing the MenuTool menus which work fine until the theme is changed. If i initially set the theme in the xaml code things work as expected.
Thanks,
Jamie
Thanks for the reply Andrew,
Changing the style worked. Thanks!
Yes I was able to reproduce the issue and it is related to having a derived xamRibbon. Basically in WPF local styles are specifically tied to the class type name. When you set the Theme you are putting a resource dictionary that contains resources for the various classes (xamRibbon, ButtonTool, RibbonGroup, etc.) into the resources chain. Those will be the local styles unless they are overriden (e.g. putting a resource into the Resources of the xamRibbon or setting the Style property of an element). In this case because you have a derived xamRibbon, the Office2k7Black style for the xamRibbon will not be applied - since the specific type is now RibbonBugTest.MyRibbon and not Infragistics.Windows.Ribbon.xamRibbon. I have written this up so we can look into it further. For now I can think of 2 workarounds. One is to not use a derived xamRibbon. If you want to define the xaml in a separate location you can use the technique I outlined here. Another option would be to explicitly set the Style property of the xamRibbon when you change the theme. e.g.
I've attached a sample project that demonstrates the problem.
In making this sample I found that the functionality of the Menu was lost when I moved the Ribbon into its own xaml file.
When changing the theme when the ribbon was defined in the same xaml file the menu would still dropdown properly. When i created my own ribbon them dropdown functionality was lost as soon as the theme was changed.
Thanks for the help,
Have you tried this with the latest hotfix? Can you provide a sample that demonstrates the problem so I can see the issue?