WPF Container: equal width for elements but with spacing between them

Viewed 14231

I'd like to have a container with only four buttons in it. Buttons should be aligned horizontally, have the same width, not fill all the available space and have equal space between them.

I would not like to set margin for buttons. Is there any combination of containers and/or their properties, that will help me to achieve this goal?

I've tried using StackPanel, UniformGrid, simple Grid, but with no success - either I get huge buttons (though equal in width), or I end up with spacing between buttons, but they have different width.

3 Answers
Related