Expression Blend Example Chinese tutorial (5)

Source: Internet
Author: User

Expression Blend Example Chinese tutorial (5)-Quick start of layout controls Stackpanel,scrollviewer and border

The previous article describes the use of the canvas layout control in blend. This article continues to describe the layout controls Stackpanel,scrollviewer and border.

Compared to grid and canvas, stackpanel,scrollviewer and border are simpler layout controls, and the functionality is relatively singular.

First of all, say StackPanel control. The meaning of the stack panel is understood literally. All content within the stack is arranged in order, arranged in a horizontal and vertical way.

For StackPanel use, the control is arranged horizontally or vertically, using the control to arrange controls that are much easier to control than the grid Setup table.

For example, to set the row and column in grid, and then place the control in each cell, you can achieve the effect of aligning the layout, while in StackPanel you can use the Orientation property control.

Here we have a brief demonstration of the application of StackPanel in blend

When StackPanel is selected, draw a StackPanel container in the main window.

Then select the button control, and in StackPanel, draw a button with a height of 30. Then select the button, copy create three new buttons, and when you copy and paste, you will find that each time you create a new button, it will automatically flow down in the layout. Unlike grid and canvas, copying and pasting controls in grid and canvas automatically overwrites the previous control and requires ZIndex control over its location.

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.