The relationship between the WPF layout control and the HorizontalAlignment/verticalignment attribute of the Child control,

Source: Internet
Author: User

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.

Related Article

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.