I have a ButtonTool on my ribbon whose caption can change. To prevent the button from resizing (and making the entire ribbon to the right of it jump in a very weird way), I set MinWidth.
This prevents the jumpiness, but the alignment within the tool is wrong. It auto-centers the image and text with eachother, and then jams it to the left side of the button. So I now have a button with a picture and text nicely aligned with eachother, but not within the ButtonTool.
I'm attempting to switch to a label + button without text, but I was wondering if there's an easy way out here?
Try setting the HorizontalContentAlignment to Center. BTW, I'm curious what weird jump you are referring to. Can you describe the problem changing the caption was causing?
Of course that worked -- I had the attribute on the wrong tag. Thanks.
The jumping? Try it. Don't set MinWidth and change the text until it gets wider than the icon. The button starts resizing, moving other buttons out of the way. Quite unsettling.
Actually, I have a popup where hovering changes the value the button text is bound to, so the button would resize constantly (bouncing everything to its right with it), creating a somewhat unnerving experience.
Ah, problem found. I had changed things around before I posted this. It's the MenuTool, not the ButtonTool, that shows this behavior -- and HorizontalContentAlignment doesn't work.
Yes I see what you are referring to. This looks like an issue with the default styles. You should report this to the support group and mention issue 14852 so you can be notifiied when its addressed. In the meantime, if you wanted to handle this you would probably have to take the default xaml we ship with the control (in the DefaultStyles dir) and modify the MenuButtonArea templates.
Okidoki. One thing... I've been poking around the site for the past 10 minutes and I cannot find an established way to contact the support group. Am I blind?
The main support page lists the various ways you can contact the support group.