WPF separates forms with grids

Source: Internet
Author: User

A very good code for WPF on the web

Grid name= "Gridmain" >
<Grid.ColumnDefinitions>
<columndefinition width= "30*"/>
<columndefinition width= "70*"/>
</Grid.ColumnDefinitions>
<label background= "LightBlue" verticalcontentalignment= "center" horizontalcontentalignment= "center"
grid.row= "0" grid.column= "0" >
Column1
</Label>
<gridsplitter width= "5" verticalalignment= "Stretch" horizontalalignment= "right"/>
<label background= "LightGreen" verticalcontentalignment= "center" horizontalcontentalignment= "center"
grid.row= "0" grid.column= "1" >
Column2
</Label>
<grid name= "Gridrightcolumn" grid.row= "0" grid.column= "1" >
<Grid.RowDefinitions>
<rowdefinition/>
<rowdefinition/>
</Grid.RowDefinitions>
<label grid.row= "0" grid.column= "0" width= "height=" horizontalalignment= "Center"
Verticalalignment= "Center" horizontalcontentalignment= "center" verticalcontentalignment= "center"
background= "Hotpink" >
Row1
</Label>
<grid grid.row= "0" grid.column= "0" >
<Grid.RowDefinitions>
<rowdefinition/>
<rowdefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<columndefinition/>
<columndefinition/>
</Grid.ColumnDefinitions>
<textblock grid.row= "0" grid.column= "0" horizontalalignment= "center" verticalalignment= "center" >cell11</ Textblock>
<textblock grid.row= "0" grid.column= "1" horizontalalignment= "center" verticalalignment= "center" >cell12</ Textblock>
<textblock grid.row= "1" grid.column= "0" horizontalalignment= "center" verticalalignment= "center" >cell21</ Textblock>
<textblock grid.row= "1" grid.column= "1" horizontalalignment= "center" verticalalignment= "center" >cell22</ Textblock>
<gridsplitter width= "5" grid.rowspan= "2" verticalalignment= "Stretch" horizontalalignment= "right"/>
<gridsplitter height= "5" grid.columnspan= "2" horizontalalignment= "Stretch" verticalalignment= "Bottom"/>
</Grid>
<gridsplitter height= "5" horizontalalignment= "Stretch" verticalalignment= "Bottom"/>
<label grid.row= "1" grid.column= "0" width= "height=" horizontalalignment= "Center"
Verticalalignment= "Center" horizontalcontentalignment= "center" verticalcontentalignment= "center"
background= "Hotpink" >
Row2
</Label>
</Grid>

Original address: http://www.cnblogs.com/Ray898/articles/5051584.html

WPF separates forms with grids

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.