Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1750
Style of ApplicationMenu2010Item
posted

Hello community!

Attached please find a screenshot of my XamRibbon.ApplicaitonMenu2010.

I have defined 4 ApplicationMenu2010Items, 3 with content ( Themes, Status, Parameter) and one without any content (Close Menu). When the user clicks on "Close Menu", the Application Menu is closed.

While I understand that the graphical appearance of the items with content is different from those without any content, I do not understand why the font size (font family?), Margin and Padding are different. This is something that I find disturbing. Are there any reasons, why the mentioned settings are different?

I used the metro dark theme for the screenshot.

Parents
  • 34430
    Verified Answer
    Offline posted

    Hello grubarec,

    Thank you for your post!

    The reason that you are seeing a difference here is that there are two states for an ApplicationMenu2010Item, and these states depend by default on whether that particular item has content. If it does, then this item will be a Tab item, and if not, it will be a Button item. As these are essentially two separate types of controls wrapped by the ApplicationMenu2010Item, the control templates of these controls are slightly different based on whether they are a tab or a button. This is the reason for the differences that you are seeing.

    The font family of the two types are the same, but the font size is slightly different. The default font size of the MetroDark button is 11, whereas the tabs are 13.2. If you set this font size on the ApplicationMenu2010Item to 13.2, the fonts will look the same.

    As far as the margin and padding, this isn't a direct effect of those properties being set. It is more an effect of the slight differences in the templates of these items. If you would like these to look the same, I would recommend going into the MetroDark default style file, commonly found at this directory: C:\Program Files (x86)\Infragistics\2015.1\WPF\DefaultStyles\Ribbon\RibbonMetroDark.xaml, and look for a section that reads ApplicationMenu2010Item Style. In here, you will see two separate ControlTemplates. One will have a key that contains ApplicationMenu2010Item.ButtonTemplateKey, and the other will read ApplicationMenu2010Item.TabTemplateKey. By including these in your project and modifying them to look alike, I believe you will be able to achieve a common styling for the button and tab ApplicationMenu2010Item controls.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

Reply Children
No Data