Original: WPF Notes (2.3 StackPanel)--layout
StackPanel is used for small-scale typesetting layouts, such as a local TextBox and button.
The Orientation property has two choices of vertical and horizontal, which determine the layout direction.
All controls have a margin property, which is used to make the controls less crowded, and margin varies with the vertical and horizontal, and of course the margin= "3,3" means that there is a gap in two directions at the same time.
The HorizontalAlignment property is used to adjust the extension direction of the control. The default is stretch, that is, how many places are in the landscape, and the Left/center/right three values, which are only three positions in the landscape, respectively, according to the minimum placeholder. The corresponding VerticalAlignment attributes are similar.
WPF notes (2.3 StackPanel)--layout