Windows Phone 7键盘大小 [英] Windows phone 7 keyboard size
问题描述
当键盘出现在屏幕上时,我想调整页面大小.
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.
就我而言.我想要整页的TextBox和下面的一些按钮.
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.
请帮助我.
/////------------------------------------------ -----------------------------------
///// -----------------------------------------------------------------------------
我会不喜欢这个操作系统!提议的解决方案根本不好.当键盘可见时,我无法向下滚动.
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.
让我们说我只需要简单的TextBox来让用户写点东西.但这是不可能的!
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.
如果您希望始终显示按钮",那么最好的,唯一可靠的方法是使用ApplicationBar.
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.
这篇关于Windows Phone 7键盘大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!