The relationship between the WPF layout control and the Horizontalalignment/verticalalignment property of the child control:
1. Canvas/wrappanel Control:
The Horizontalalignment/verticalalignment property of its child controls is invalid.
2. Grid control:
The Horizontalalignment/verticalalignment property of its child controls is valid.
3. StackPanel Control:
A, when its Orientation property equals horizontal, the HorizontalAlignment property of its child controls is invalid, and the VerticalAlignment property is valid.
B, when its Orientation property equals vertical, the HorizontalAlignment property of its child controls is valid, and the VerticalAlignment property is invalid.
4. DockPanel Control:
A, (for non-end-seat controls) when its child controls are set Dockpanel.dock=left/right, the HorizontalAlignment property of its child controls is invalid, and the VerticalAlignment property is valid.
B, (for non-end-seat controls) when its child controls are set Dockpanel.dock=top/bottom, the HorizontalAlignment property of its child controls is valid, and the VerticalAlignment property is invalid.
C, when its LastChildFill property equals True, the dockpanel.dock of its last child control is invalid, the HorizontalAlignment property is valid, and the VerticalAlignment property is valid.
D, when its LastChildFill property equals false, the dockpanel.dock of its last child control is valid, at which point, if the child control is set to Dockpanel.dock=left/right, the The HorizontalAlignment property of the child control is invalid, the VerticalAlignment property is valid, and if the child control is set Dockpanel.dock=top/bottom, the The HorizontalAlignment property of the child control is valid and the VerticalAlignment property is not valid.
The relationship between the WPF layout control and the Horizontalalignment/verticalalignment property of the child control