Always keep an eye on the node:
In WPF, each LayoutControl is a Grid - or playable with a Grid - but it uses different definitions of columns or rows and Alignment .
Stackpanel is a grid that contains the following setting (horizontal):
- Column designation for each added
Auto size control - All Added Child Controls HorizontalAligment is Center
- Additional column definition with * Width
And the way cookies get clogged.
Auto-size allocates space based on the size of the content that is inside the column or row.
As a rule, this is the minimum possible size: /
So +1 for @Bradley Uffner
Use a Grid where the Columndefinition for the Min / Max Rectangle parameter is * .
source share