Silverlight 4 knowledge classification and summary (3) coordinate system and layout panel of Elements

Source: Internet
Author: User
1. Comma syntax for margin and padding

By using system. Windows. thicknessconverter, The XAML syntax is converted to a specific thickness.

Margin = "10" is equivalent to xxxx. Margin = New thickness (10 );

Margin = "is equivalent to xxxx. Margin = New thickness );

2. verticalcontentalignment of the label can center the content vertically, while textblock does not have this attribute. 3. You can change the orientation attribute of stackpanel to achieve horizontal and vertical layout, flowdirection = "righttoleft" can change the order of left and right

4. Set the filling mode based on the stretch attributes of image and viewbox.

Stretch = "NONE"

Stretch = "fill"

Stretch = "Uniform"

Stretch = "uniformtofill"

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.