I developing application for windows-phone,
I want to create table with 2 rows an 2 columns
I create xaml code for this table
<Grid Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions/>
</Grid>
I want to create this Grid in code
Grid chat_userpicgrid = new Grid();
newgrid.Children.Add(chat_userpicgrid);
But I don’t know how to create RowDefinitions and ColumnDefinitions.
To position elements in specific cells:
Have a look at the code at the bottom of this MSDN page