How to make screen scroll when keyboard comes up?

96 Views Asked by At

I want to make my screen scroll when virtual keyboard comes so that i can enter text in text boxes hidden behind the keyboard. In windows phone 8 there is no way of knowing keyboards height.

when i tap text box 1 keyboard pops up, now i want to enter text in text box 4 and 5 by scrolling the screen and without removing the keyboard.

following is the xaml code.

    <Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>


    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
        <TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
        <TextBlock Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
    </StackPanel>

    <!--ContentPanel - place additional content here-->
    <StackPanel x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <TextBox x:Name="txt1" ></TextBox>
        <TextBox x:Name="txt2" ></TextBox>
        <TextBox x:Name="txt3" ></TextBox>
        <TextBox x:Name="txt4" ></TextBox>
        <TextBox x:Name="txt5" ></TextBox>
        <TextBox x:Name="txt6" ></TextBox>




    </StackPanel>


</Grid>

before

after

0

There are 0 best solutions below