I have a XamRibbon that has several static RibbonGroups on a Tab. On the same tab, at runtime I add several other ribbon groups with dynamic content. When I do not use the Theme property of the XamRibbon there is no problem. If I set the Theme property in xaml for the XamRibbon, the static RibbonGroups have the correct styling. The dynamically added RibbonGroups do not.
I don't see any properties on the RibbonGroup for Theme that I can set before I add these items at runtime. Is there a specific Style Key that I can use to set the RibbonGroup to look like the other RibbonGroups? I am using a custom style for RibbonGroup and the controls contained in it. Do I need to have these Styles BasedOn a specific Infragistics Style depending on the theme selected for the ribbon?
Specifically I am testing using the "Metro" style on my XamRibbon and have discovered this issue.
Thanks in advance!
Sometimes when I write out questions to this forum, I figure out the answer right after because I just had to think through all the details to write it up for you...
I was setting the style of my dynamic RibbonGroups in code before adding them. To fix the problem, I simply did the work of the style programatically setting properties and removed the style setter. Then my dynamic RibbonGroups appear with the correct styling at runtime and look the same as the static RibbonGroups.
It might be good to know if there is an Infragistics Style resource that I could use as a BasedOn for this situation, though. But I have solved it anyway.
Thanks for your help.
Hello,
I am just checking if you require any further assistance on the matter.
Thank you for your feedback. I am glad that you have managed to solve your issue. This behavior appears because you have set the ‘Theme’ property of the XamRibbon. Another approach to apply the style for the RibbonGroups could be to add the style in the resources of the XamRibbon control. For more information on this matter you can look into the following blog :
http://ko.infragistics.com/community/blogs/andrew_smith/archive/2009/12/09/common-style-issues-when-using-the-theme-property.aspx
Let me know, if you need any further assistance on this matter.