导航按钮隐藏Windows Phone 8.1 [英] Navigation buttons hiding Windows Phone 8.1

查看:89
本文介绍了导航按钮隐藏Windows Phone 8.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建Windows Phone 8.1应用程序,并且面临以下问题.有些电话没有硬件导航按钮(用于后退,回家和搜索的按钮).当虚拟导航栏出现时,这些电话会收缩整个UI,我不希望这种情况发生.那么我该怎么做呢?互联网接缝不知道答案(或者我搜索的不够好). 这就是我说虚拟导航按钮时的意思.

I'm building a Windows Phone 8.1 application, and I'm facing the following problem. There are phones that don't have hardware navigation buttons(those for back, home and search). Those phones will shrink whole UI when virtual navigation bar appears, I don't want that to happen. So what can I do to prevent this? Internet seams not to know the answer(or I haven't searched good enough). This is what I mean when I say virtual navigation buttons.

推荐答案

您需要将ApplicationViewBoundsMode设置为UseCoreWindow:

 ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);

默认值为ApplicationViewBoundsMode.UseVisible,这是您当前的行为.使用ApplicationViewBoundsMode.UseCoreWindow,命令栏,状态栏或软件按​​钮将占据空间.

The default is ApplicationViewBoundsMode.UseVisible which is your current behavior. With ApplicationViewBoundsMode.UseCoreWindow, the command bar, status bar nor the software buttons will occupy space.

如果在BoundsMode更改时需要更改边距或其他任何内容,请注册VisibleBoundsChanged事件:

If you need to change your margins or anything else when the BoundsMode changes, register for the VisibleBoundsChanged event:

ApplicationView.GetForCurrentView().VisibleBoundsChanged += OnVisibleBoundsChanged

您可以在官方文档.

这篇关于导航按钮隐藏Windows Phone 8.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆