开发者

Windows phone 7 keyboard size

开发者 https://www.devze.com 2023-01-29 11:04 出处:网络
I want to resize the page when the keyboard appears on the screen. I was looking for any clue all day but I can\'t find anything.

I want to resize the page when the keyboard appears on the screen.

I was looking for any clue all day but I can't find anything.

In my case. I want to have full page TextBox and some buttons under it.

<Grid x:Name="RootLayout" >

    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="70"/>
        </Grid.RowDefinitions>

        <ScrollViewer Margin="0" >
            <TextBox TextWrapping="Wrap" Text="TextBox" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" Height="698" Width="480"/>
        </ScrollViewer>

        <Canvas x:Name="RootMenu" Margin="0,1,0,0" Grid.Row="1" />
    开发者_高级运维</Grid>

</Grid>

I use to thing that the first row will change its size automatically, but it doesn't happening.

Please help me.

///// -----------------------------------------------------------------------------

I'm going to dislike this OS! Proposed solution is not good at all. When the keyboard is visible then I can not scroll it down.

Lets say I want just simple TextBox to let users write something. But it is impossible !!

<phone:PhoneApplicationPage.ApplicationBar>
    <shell:ApplicationBar IsVisible="True">
        <shell:ApplicationBarIconButton IconUri="/icons/appbar.check.rest.png" Text="aplay"/>
    </shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>

<Grid x:Name="RootLayout" >
    <ScrollViewer>
        <TextBox  Text="TextBox" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" />
    </ScrollViewer>
</Grid>


There isn't a way to know for sure if the SIP is displayed. Jaime Rodriguez has a post showing how to make a fairly reliable guess of this.

If you want to have "buttons" that are always displayed then the best, and only reliable, way to do this is to use the ApplicationBar.

0

精彩评论

暂无评论...
验证码 换一张
取 消