I’m writing a form in XAML that has multiple buttons with content of different sizes (ie “OK” and “Save As…”) Ideally, I’d like them all to be the smallest size possible to hold the largest content. In the example above, both buttons would be the width necessary to hold “Save As…” plus the margins and padding.
If they were Grid cells, I could use a SizeGroup. Is there a similar declaration for Buttons?
If there is, I’ve not heard of it. Unless someone else knows better, one approach would be to create a container object that automatically sized it’s contents for you. It’s probably not worth the overhead. Alternately, you could edit the layout in Blend which is designed to make that sort of thing easy.