Layout2:stackpanel (Supplementary Assignment)

Source: Internet
Author: User

<stackpanel orientation= "Horizontal" verticalalignment= "Bottom" >

<rectangle height= "" "Width=" fill= "Bisque"/>

<stackpanel orientation= "Vertical" >

<stackpanel orientation= "Horizontal" >

<rectangle height= "width=" fill= "Purple"/>

<stackpanel orientation= "Vertical" >

<rectangle width= "height=" fill= "Red"/>

<rectangle width= "height=" fill= "Blue"/>

</StackPanel>

</StackPanel>

<stackpanel orientation= "Horizontal" >

<stackpanel orientation= "Vertical" >

<rectangle width= "height=" fill= "Brown"/>

<rectangle width= "height=" "fill=" Burlywood "/>"

</StackPanel>

<rectangle height= "width=" fill= "Green"/>

</StackPanel>

</StackPanel>

</StackPanel>

For StackPanel, I think it is dividing the area, for the first big StackPanel

It can set the trend, and close to the border.

1, then StackPanel can also set StackPanel its parent StackPanel is horizontal, then the default is from left to right, from the above example you can see. If the parent StackPanel is vertical, then the default is from top to bottom, and the example above has a demo.

2, and in the large StackPanel not set its height or its width, this time the height of the control can be based on the height of the decision, for example, in this case the first added a high 200 rectangle, and then this StackPanel adaptive to 200, The equivalent is height= "Auto". Width of course, the default is the screen width.

3, orientation can be set inside the control of the direction of the horizontal is the horizontal direction, from left to right

Vertical is the longitudinal direction, arranged from top to bottom.

Layout2:stackpanel (Supplementary Assignment)

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.