Grid grid layout Control

Source: Internet
Author: User

GridDefines a content modifier that can stretch and scale a single sub-element to fill up available space.

Why do we first introduce this control?ProgramUi layout is indispensable, so we will first introduce this control.

 <  Window  X: Class  = "Materialstorage. mainwindow"  Xmlns  = "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"  Xmlns: x  = "Http://schemas.microsoft.com/winfx/2006/xaml"  Title  = "Mainwindow"  Height = "350"  Width  = "525"  >      <  Grid  >          <! --  Here, the mesh is defined with three rows and one column. The first row is 20, the third row is 20, and the rest are adaptive.  -->          <  Grid. rowdefinitions  >              <  Rowdefinition  Height = "20"  > </  Rowdefinition  >              <  Rowdefinition  Height  = "*"  > </  Rowdefinition  >              <  Rowdefinition  Height  = "20"  > </ Rowdefinition  >          </  Grid. rowdefinitions  >          <  Grid. columndefinitions  >              <  Columndefinition  Width  = "*"   > </  Columndefinition  >          </ Grid. columndefinitions  >          <  Button  Grid. Row  = "0"  > Button 1 </  Button  >          <! --  Here, you need to manually define the grid where the control is located. Otherwise, they will display the four values of margin by default 0, which correspond to the upper left and lower right.  -->          <  Button  Grid. Row = "1"  Grid. Column  = "0"  Height  = "30"  Width  = "60"  Verticalalignment  = "Center"  Horizontalalignment  = "Left"  Margin  = "20, 0, 0"  > Button 2 </  Button >          <  Button  Grid. Row  = "2"  > Button 3 </  Button  >      </  Grid  >  </  Window  > 

 

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.