The relationship between the WPF layout control and the Horizontalalignment/verticalalignment property of the child control

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.