windows-phone-7 – 当键盘处于活动状态时,ScrollViewer不会向上
发布时间:2020-12-14 05:41:56 所属栏目:Windows 来源:网络整理
导读:如何在 Windows Phone中获取表单行为,如设置移动网络 EditAPN.在此页面中,它在scrollviewer中有许多文本框.当用户点击任何文本框并获得焦点时,页面向上滚动并且页眉保持不变并显示SIP键盘.当用户从此文本框中丢失焦点时,页面将进入正常状态,SIP键盘隐藏和标
如何在
Windows Phone中获取表单行为,如设置>>移动网络>> EditAPN.在此页面中,它在scrollviewer中有许多文本框.当用户点击任何文本框并获得焦点时,页面向上滚动并且页眉保持不变并显示SIP键盘.当用户从此文本框中丢失焦点时,页面将进入正常状态,SIP键盘隐藏和标题保持不变.我想实现这种行为.我搜索了很多但没有得到任何解决方案.
很奇怪在WP7中看到scrollviewer行为. 任何帮助都将是伟大而可观的. 提前致谢. 注意:如果有任何棘手的解决方案,请提供示例代码. 这是我的示例代码. <Grid x:Name="ContentPanel" Grid.Row="1" > <ScrollViewer x:Name="Scroller"> <StackPanel Orientation="Vertical"> <TextBlock Text="Name"/> <TextBox x:Name="txtName" /> <TextBlock Text="Email"/> <TextBox x:Name="txtEmail"/> <TextBlock Text="Phone"/> <TextBox x:Name="txtPhone" /> <TextBlock Text="Adress"/> <TextBox x:Name="txtAddress" /> </StackPanel> </ScrollViewer> </Grid> 当我尝试向下滚动时,它不会完全向下移动,看起来像弹性一样. 编辑: 解决方法
也许我错了,但为什么不使用简单的网格和listpicker控件.您将需要Windows Phone Toolkit(Nuget
Here).
网格的第一行包含标题,不会更改. 这是一个非常基本的例子: <phone:PhoneApplicationPage x:Class="PhoneApp3.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" SupportedOrientations="Portrait" Orientation="Portrait" shell:SystemTray.IsVisible="True"> <!--LayoutRoot is the root grid where all page content is placed--> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <!--TitlePanel contains the name of the application and page title--> <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,28"> <TextBlock x:Name="PageTitle" Text="MY HEADER" Margin="9,-7,0" Style="{StaticResource PhoneTextTitle1Style}"/> </StackPanel> <Grid x:Name="ContentPanel" Grid.Row="1"> <toolkit:ListPicker> <toolkit:ListPickerItem Content="aaa" /> <toolkit:ListPickerItem Content="bbb" /> <toolkit:ListPickerItem Content="ccc" /> </toolkit:ListPicker> </Grid> </Grid> </phone:PhoneApplicationPage> 编辑: 呈现SIP键盘时,PhoneApplicationFrame.TranslateTransform.Y设置为特定值(横向为-259,纵向为-339).要更新布局,我们只需将上边距设置为指定值(-s),然后Silverlight布局系统将解决问题. 这个example可以帮到你. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows – 如何在Internet上获取文件版本但不下载?
- windows-phone-7 – 目标WP7和WP8.1(8.0设备将获得WP7应用程
- Windows系统SVN服务器搭建与使用
- windows – 如何从Wave Out捕获PCM数据
- windows单机实现hbase、hive 整合
- Windows卷影复制错误:2155348129
- windows-server-2008-r2 – 将Hyper-v中的VM导出为OVF
- .net – 部署到Azure App Service时缺少Application Insigh
- 为什么win32上没有c#native编译项目?
- .NET的哪些部分需要执行管理权限?
推荐文章
站长推荐
- windows-server-2008 – 我应该在Windows 2008服
- 如何实现标准的Windows Phone 7 ComboBox替换UI
- 在哪里可以了解Windows内核?
- 如何在Windows XP上的startup.bat文件中设置Heap
- Windows和Linux中php代码调试工具Xdebug的安装与
- windows-7 – Windows 7无人值守安装和磁盘/分区
- windows-server-2008 – Windows Server 2008上的
- Windows – 如何以编程方式更改.bat文件的图标?
- 如何编写脚本来修改Windows Server上用户的密码到
- windows – 用于打印图片的命令行工具?
热点阅读