top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to we use Grid in XAML using Windows Phone App??

+2 votes
273 views

any one help how to use code wise example for Grid using in phone application....

posted Oct 15, 2014 by Puhal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

GRID PANEL:

The Grid element in XAML represents a Grid panel. The following code snippet creates a Grid element and sets its background, width, height, vertical and horizontal alignment properties.

XAML CODE:

            <Grid Name="GridPanel" Background="Blue" Width="280" Height="220"  
             VerticalAlignment="Top" HorizontalAlignment="Center" >  
           </Grid>  

To add rows to a grid by using the XAML editor:

             1.  In the XAML editor, locate a Grid element.
             2  Add a Grid.RowDefinitions element as a child of the Grid element. The code should look like the following:

EXAMPLE Row :

             <Grid.RowDefinitions>
             <RowDefinition Height="100" />
             <RowDefinition Height="Auto" />
             <RowDefinition Height="*" />
             <RowDefinition Height="5*" />
             </Grid.RowDefinitions>

To add columns to a grid by using the XAML editor

              1.  In the XAML editor, locate a Grid element.
              2.  Add a Grid.ColumnDefinitions element as a child of the Grid element. The code should look like the following:

EXAMPLE COLUMN:

             <Grid.ColumnDefinitions>
             <ColumnDefinition Width="100" />
             <ColumnDefinition Width="Auto" />
             <ColumnDefinition Width="*" />
             <ColumnDefinition Width="5*" />
             </Grid.ColumnDefinitions>
answer Oct 21, 2014 by Jdk
Similar Questions
+2 votes

I often see while developing phone app in grid they using Asterisk(*) and Auto , i cant identify its use any people pls kindly give some suggestions....

...