windows-phone-7 – WP7 – 显示隐藏应用程序栏
发布时间:2020-12-14 05:53:02 所属栏目:Windows 来源:网络整理
导读:在许多 Windows Phone 7应用程序中,默认情况下隐藏应用程序栏,当您按住屏幕时,应用程序栏会显示.由于许多WP7应用程序都有这种行为,我想知道,如果使用ApplicationBar有这种行为的内置支持,我该如何使用它呢? 解决方法 您可以使用 toolkit中的GestureService
在许多
Windows Phone 7应用程序中,默认情况下隐藏应用程序栏,当您按住屏幕时,应用程序栏会显示.由于许多WP7应用程序都有这种行为,我想知道,如果使用ApplicationBar有这种行为的内置支持,我该如何使用它呢?
解决方法
您可以使用
toolkit中的GestureService来检测Hold事件.
例如. <TextBlock TextWrapping="Wrap" Text="lorem ipsum ..."> <toolkit:GestureService.GestureListener> <toolkit:GestureListener Hold="TapAndHold" /> </toolkit:GestureService.GestureListener> </TextBlock> 以及事件处理程序的以下内容: private void TapAndHold(object sender,GestureEventArgs e) { this.ApplicationBar.IsVisible = !this.ApplicationBar.IsVisible; } 然后按住文本块上的任何位置将切换ApplicationBar的显示. 如果您想要切换,如果用户点击并保持在页面上的任何位置,那么您可以将手势监听器附加到页面的根对象.例如 <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <toolkit:GestureService.GestureListener> <toolkit:GestureListener Hold="TapAndHold" /> </toolkit:GestureService.GestureListener> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- active-directory – 使用DSMOD解锁AD用户帐户(命令行)
- 如何在Windows命令行上获取文件的最后修改日期?
- Windows“netstat -b”如何确定拥有每个套接字的进程的名称
- windows – 处理Git拒绝重置的文件?
- windows-7 – 激活Windows 7:KMS与MAK
- 我应该在Windows中使用Mercurial使用哪个合并工具?
- Windows-8 – 使用InstallShield 2010在Windows 8上的MSI自
- 蓝牙 – Windows phone 8.1 streamsocket.connectAsync生成
- windows – 控制台发出哔声字符代码 – 错误号码?
- Windows上的git svn rebase问题
推荐文章
站长推荐
- Window调整大小事件在jQuery中触发两次
- netcore开发windows普通服务(非Web)并一键发布到
- windows-7 – 黑莓模拟器屏幕刷新
- Windows?2000?Professional?中?II
- windows-server-2008 – 在EC2上部署网站数据库有
- Windows系统CPU内存网络性能统计第四篇 CPU 多核
- windows – 便携式浏览器在部署R Shiny App时出现
- 电子邮件 – Office 365 Hosted Exchange发生奇怪
- Windows – 通过间歇网络连接复制文件
- wcf – ClientCredentialType = Windows和= Ntlm
热点阅读