Hi,
I've been using XamRibbon for years and it always has this issue with cutting off the bottom of button's caption, see attached for example. The letter 'g' in word ‘Mapping' was cut off. Is there any way to fix this? Thanks.
Hi Rob,
I did more investigation and the result was just rather weird. It ended up this way, if I put in two identical RibbonTabItem (same image, same caption) in the ribbon, the first got displayed won't have this cut-off issue, the other one (and any subsequent ones) will always have this cut off issue. And it's noticable that when switching from the first tab to other tabs, the top margin of the icon image is changing, which pushed text down a little bit and caused the cut-off.
I can't think of anything that we could probably have done to make this happen. But I'm looking at a pretty complex and highly customized application here. The only thing I could imagine is the subsequent ribbon tabs are virtualized thus when loading them on demand, something different from the first one happens. If you happen to know anything in this regard, please advise.
Anyway, thanks a lot for your help. I believe this is not likely to be an IG issue because I can't reproduce this in a simple solution.
Hi Daniel,
The font got smaller because the default font size is 11. Once you removed your FontSize setting it reverted back to this smaller size. I've attached a sample that sets the FontSize and FontFamily as you had done and I don't see any clipping on the ButtonTool. Can you verify this in the sample? Is there anything else you're doing on the ribbon in your application that you can add to my sample to reproduce this?
Hi Rob, thanks a lot for your investigation. The strange part in this story though, is that we used to set font on XamRibbon and this issue occurred. Once I removed that font setting on XamRibbon, the issue went away (and I did notice the font got a little bit smaller than before). I double checked today that "Segoe UI 12" was what we used to set. Anyway, I'll live with this until someone raises the issue of font getting smaller on Ribbon...
I was able to reproduce the issue if I placed the font settings on the ButtonTool itself. I think the clipping occurs because the rest of the control is using one font/size and the button tool is trying to use a different size which causes sizing issues.
One way to resolve this would be to place the font family and size directly on the ribbon instead of the button tool. Doing this resulted in proper sizing of all the buttons so that no clipping occurred.
<igRibbon:XamRibbon FontSize="12" FontFamily="Segoe UI">
Hi Rob, I don't have access to my desktop today, as far as I remember, it's Segoe UI, size 12.
I used Snoop to inspect the visual tree and found the itemscontrol that hosts the button tools has a height binding that caused this cut-off, only 1 px smaller than what's desired. This binding is probably set through code as I can't see it in the template shipped with the product.