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?
I did try it. Changing the size of the text would and should change the size of the button since the button sizes to content. I didn't see anything unsettling or out of the ordinary which is why I asked.
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.
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?