I got a view and I try to make it compatible wih all resolutions for windows Phone.I know to do his I have to use "auto" value for margin, height,width rpoperties but I can't get the design i want...I pasted the xaml code...your help is welcome

![enter image description here](https://i.stack.imgur.com/HtOR0.png)

```xaml
    <Grid x:Name="LayoutRoot" Background="#FF00485A">
        <Grid.RowDefinitions>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="*"/>
            <RowDefinition  Height="auto"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contient le nom de l'application et le titre de la page-->
        <Grid Grid.Row="0" >
            <Image Width="180" Height="180" Source="/Images/BContact/ico_app-authent_bannuaire.png" HorizontalAlignment="Center" Margin="0,20,0,90"></Image>
        </Grid>

        <Grid Grid.Row="1" Margin="12,10,12,0" >

        <StackPanel Background="#FF003A48"   HorizontalAlignment="Center" Margin="12,-10,12,0">
                <PasswordBox x:Name="Passwordtext" IsEnabled="False" BorderBrush="Transparent" Background="#55000000" Width="476"  MaxLength="6"   HorizontalAlignment="Center" PasswordChar="•" Height="106" />
            </StackPanel>
            <TextBlock  x:Name="entrezcodepin" VerticalAlignment="Center" Text="Entrez votre code PIN"  Foreground="White" FontSize="20"  HorizontalAlignment="Center" />
        </Grid>

        <!--ContentPanel - placez tout contenu supplémentaire ici-->
        <Grid x:Name="ContentPanel" Grid.Row="2" Margin="12,0,12,0"  >

            <Grid.RowDefinitions>
                <RowDefinition  Height="*"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Button  Grid.Row="0" Grid.Column="0" Content="1" Background="White" FontSize="40" Foreground="#FF003A48"   Click="EnterPassword"></Button>

            <Button Grid.Row="1" Grid.Column="1" Content="5" Background="White" FontSize="40" Foreground="#FF003A48"   Click="EnterPassword" ></Button>

            <Button  Grid.Row="2" Grid.Column="2" Content="9" Background="White"  FontSize="40" Foreground="#FF003A48"   Click="EnterPassword"></Button>

            <Button Grid.Row="3" Grid.Column="0" Content=" " Background="White" FontSize="40" Foreground="#FF003A48" Click="EnterPassword" ></Button>

            <Button  Grid.Row="0" Grid.Column="1" Content="2" Background="White" FontSize="40" Foreground="#FF003A48"  Click="EnterPassword"></Button>

            <Button Grid.Row="1" Grid.Column="2" Content="6" Background="White" FontSize="40" Foreground="#FF003A48"    Click="EnterPassword"></Button>

            <Button  Grid.Row="2" Grid.Column="0" Content="7" Background="White" FontSize="40" Foreground="#FF003A48"  Click="EnterPassword"></Button>

            <Button  Grid.Row="3" Grid.Column="1" Content="0" Background="White" FontSize="40" Foreground="#FF003A48"    Click="EnterPassword" ></Button>

            <Button Grid.Row="0" Grid.Column="2" Content="3" Background="White" FontSize="40" Foreground="#FF003A48"    Click="EnterPassword"></Button>

            <Button  Grid.Row="1" Grid.Column="0" Content="4" Background="White" FontSize="40" Foreground="#FF003A48"   Click="EnterPassword"></Button>

            <Button  Grid.Row="2" Grid.Column="1" Content="8" Background="White" FontSize="40" Foreground="#FF003A48"    Click="EnterPassword"></Button>

            <Button  Grid.Row="3" Grid.Column="2"  Background="White" Foreground="#55000000"   Click="EnterPassword">

                <Image Source="/Images/ico_action_delete-text.png" MaxHeight="54"  ></Image>

            </Button>

        </Grid>

    </Grid>
</phone:PhoneApplicationPage>

```