Thursday, 4 September 2014

WPF : Grid layout demo for spiting window screen partition

<Grid ShowGridLines="True">
        <Grid.RowDefinitions>
            <RowDefinition Height="100"></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition ></ColumnDefinition>
        </Grid.ColumnDefinitions>

</Grid>

_____________________________________________________________________________

split window in three row with first row has 100 px height and last row has 30 px height and middle row contain rest of all part of screen 
_____________________________________________________________________________

<Grid ShowGridLines="True">
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition ></ColumnDefinition>
            <ColumnDefinition ></ColumnDefinition>
        </Grid.ColumnDefinitions>

</Grid>

______________________________________________________________________________

Evenly split window screen into four part has two row and each row as two column
______________________________________________________________________________

<Grid ShowGridLines="True">
<Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
       </Grid.RowDefinitions>
       <Grid.ColumnDefinitions>
            <ColumnDefinition Width="7*"></ColumnDefinition>
            <ColumnDefinition Width="2*"></ColumnDefinition>
       </Grid.ColumnDefinitions>      
</Grid>
_______________________________________________________________________________

spit window in two column, column 1 has 7X width and column 2 has 2X width where X is multiple for screen spiting element work like as percentage  
_______________________________________________________________________________


  

No comments:

Post a Comment