The relationship between the WPF layout control and the HorizontalAlignment/verticalignment attribute of the Child control,
The relationship between the WPF layout control and the HorizontalAlignment/verticalignment attribute of the Child control:
1. Canvas/WrapPanel control:
The HorizontalAlignment/verticalignment attribute of its child control is invalid.
2. Grid Control:
The HorizontalAlignment/verticalignment attribute of its child control is valid.
3. StackPanel control:
A. When its Orientation attribute is equal to Horizontal, the HorizontalAlignment attribute of its child control is invalid and VerticalAlignment attribute is valid.
B. When its Orientation attribute is equal to Vertical, the HorizontalAlignment attribute of its child control is valid and verticalignment attribute is invalid.
4. DockPanel control:
A. (applicable to non-last seat controls) when its child controls set DockPanel. Dock = Left/Right, The HorizontalAlignment attribute of its child controls is invalid, and the verticalignment attribute is valid.
B. (applicable to the non-last seat Control) when its child control sets DockPanel. Dock = Top/Bottom, the HorizontalAlignment attribute of its child control is valid, and the verticalignment attribute is invalid.
C. When the LastChildFill attribute is set to true, the DockPanel. Dock of the last child control is invalid, the HorizontalAlignment attribute is valid, and the verticalignment attribute is valid.
D. When the LastChildFill attribute is set to false, the DockPanel of the last child control is displayed. the Dock is valid. In this case, if the child control is set to DockPanel. when the Dock is Left/Right, The HorizontalAlignment attribute of the Child control is invalid and verticalignment attribute is valid. If the child control is set to DockPanel. when the Dock is Top/Bottom, the HorizontalAlignment attribute of the Child control is valid, and the verticalignment attribute is invalid.