gpt4 book ai didi

windows-phone-7 - 允许使用应用程序内主页按钮导航到 MainPage 吗?

转载 作者:行者123 更新时间:2023-12-01 13:00:28 27 4
gpt4 key购买 nike

我想知道应用程序内主页按钮的实现,该按钮可将您从任何页面返回到主页面。据我所知,WP7 开发指南不允许这样做。但我找不到任何关于那个的书面信息。

有谁知道这是在哪里写的吗?

最佳答案

通常不鼓励使用主页按钮,msdn source :

Placing a Home button in your user interface deviates from the Windows Phone navigation model.

Implementing a Home button in your app may also cause a second issue, one that has a much more severe implications for your app: it might inadvertently create a scenario where a user can get stuck in an infinite (or near infinite) loop when he or she uses both your Home button and the hardware Back button to navigate. This loop may get worse if they use the Back button to move from one app back through your app just to get to another. Ensure that these issues don’t affect your app.

However, try to keep the architecture of your app as shallow as possible, and make use of lists and pivots so that the user can navigate back to the landing screen with few steps back and from there to previous launched apps.

但是有些应用程序不能进行浅层导航并且需要主页按钮,例如 google drive 或 dropbox 文件夹浏览器 - 在深入文件夹结构后,用户将希望快速导航到主页。准则,msdn source :

If your app lets users pin pages, consider whether a home button is required to let the user get back to the root of the app quickly. A home button navigates to the home page of the app and then clears the entire navigation back stack.

For example, if the pinned page is a shopping cart, the user may want to complete the purchases in the shopping cart and then start shopping again. In this case, giving the user a home button improves the user experience by reducing the number of taps they need to get back to the start of the app.

在您的主页中:

protected override void OnNavigatedTo(NavigationEventArgs e)
{
while (NavigationService.BackStack.Any())
NavigationService.RemoveBackEntry();
base.OnNavigatedTo(e);
}

关于windows-phone-7 - 允许使用应用程序内主页按钮导航到 MainPage 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6361490/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com