GodsCrimeScene
GodsCrimeScene

Reputation: 1270

Use dockpanel to stretch all children equally

What i would like to do is create a dockpanel with 4buttons and have the buttons be equal size .

However when i do this now, it formats the first 3 Buttons to fill the Contents of the button and the last button fills the remaining space.

Is there a way to have a control that i can put 4 buttons into and make them equal size. I have already seen the problems with StackPanel and from reading i thought dockpanel would fix this for me.

I know i can use setup a grid to fix this, but i was trying to find another solution.

Upvotes: 4

Views: 1260

Answers (1)

Geerten
Geerten

Reputation: 1057

I don't know which grid you know how to use, but I found the easiest solution is to use a UniformGrid with 1 row. That should fill all the buttons equally.

Upvotes: 5

Related Questions