Windows Phone Grid width: Auto or Star (*) ?

Here’s a typical XAML grid:

<Grid x:Name=”LayoutRoot” Background=”Transparent”>

<Grid.RowDefinitions>

<RowDefinition Height=”Auto”/>
<RowDefinition Height=”*”/>

</Grid.RowDefinitions>

<TextBlock Text=”Hello” />
<TextBlock Text=”Good bye” />

</Grid>

So what this means is :

  1. Auto means that the first row will automatically adapt to the size of its children or contained elements. So if it contains nothing, then the width will be zero.
  2. * means that the row will expand to use all remaining available space.

Long live Windows Phone!