Learning Silverlight 2 Series (3): interface layout

Source: Internet
Author: User
Tags relative silverlight

This article is the third in a series of articles, learning the interface layout in Silverlight 2, adding the grid and panel two layout containers in Silverlight 2, making the interface layout more powerful and flexible.

Canvas panel

Canvas is a basic layout panel in the Silverlight 1.0 era, which uses absolute coordinates. You can position the elements in canvas by using the attached property (attached), and we specify the position of the control relative to the top, bottom, left, and right coordinates of its direct parent container canvas control, with additional properties. The following XAML declares two rectangles, respectively, relative to the left margin of the parent container Canvas 50, and the top margin relative to the parent container canvas is 50 and 150 respectively:

The effect of the post-run interface is as follows:

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.