简体   繁体   English

按下设备后退按钮必须在Wp7中导航到后退或后退

[英]Pressing the device back button must navigate to back or backstack in Wp7

According to 5.2.4.1 Requirements the Expected Result for Pressing the Back button must return the application to the previous page or return to any previous page within the back stack. 根据5.2.4.1要求,按“后退”按钮的预期结果必须将应用程序返回到上一页或返回到后退堆栈中的任何上一页。 If I clear the backstack and navigate to a new page on Device Back button is this a valid for market place? 如果我清除后退堆栈并导航到“设备后退”按钮上的新页面,这对市场有效吗?

Also, If I navigate to another page and OnNavigateTo that page I clear the backstack is this also a valid for market place submission? 另外,如果我导航到另一个页面,然后在OnNavigateTo该页面上,我清除了Backstack,这对于提交市场还是有效的吗?

Thanks and Regards, Kanaya 感谢和问候,金谷

If you're clearing the back stack at some point, then navigating to a new page when the user clicks the hardware back button, then your app will fail marketplace validation. 如果您要在某个时候清除后退堆栈,然后在用户单击硬件后退按钮时导航到新页面,则您的应用程序将无法通过市场验证。 I've had it actually happen to me, and it was a bit of a headache to go back and make the app navigate "as is" without interfering with the back stack. 我确实遇到了这种情况,要返回并让应用程序“按原样”导航而不干扰后退堆栈,这有点令人头疼。

When you alter the normal behavior of a phone app like that, Microsoft frowns upon it. 当您以这种方式更改电话应用程序的正常行为时,Microsoft会皱眉。 The concept they are trying to hit is a common experience across all apps, including the operating system. 他们试图达到的概念是所有应用程序(包括操作系统)的普遍体验。

It has also been my experience (doing user testing before launch of app to the marketplace) that altering the behavior of the back button as you've described is frustrating to the user because it breaks their expectations of how the app ought to operate. 根据我的经验(在将应用程序投放市场之前进行用户测试),正如您所描述的那样,更改后退按钮的行为会使用户感到沮丧,因为这违反了他们对应用程序应如何操作的期望。 The user gets accustomed to the back button doing something very specific, regardless of the app they have open. 用户习惯于使用后退按钮执行非常具体的操作,而不管他们打开的应用程序如何。 You might want to reconsider the reasons you have for architecting the app the way you have, and strongly consider if there is an alternative that users will find more pleasant and natural. 您可能想重新考虑以自己的方式设计应用程序的原因,并强烈考虑是否有其他选择可以使用户感到更愉悦和自然。

But yes, I can tell you from experience that Microsoft will fail you for that. 但是,是的,我可以从经验中告诉您,微软将为此而失败。

If I clear the backstack and navigate to a new page on Device Back button is this a valid for market place? 如果我清除后退堆栈并导航到“设备后退”按钮上的新页面,这对市场有效吗?

Most likely not, but the question is what will happen if I press back button on that page. 很有可能不是,但是问题是,如果我按该页面上的后退按钮,将会发生什么。 Requirements are a bit complicated. 要求有点复杂。 The question you should ask yourself is "Will my app exit with ONLY back button?" 您应该问自己的问题是“仅使用后退按钮可以退出我的应用程序吗?”

Check the feature in the market place test kit. 检查市场测试套件中的功能。 You will get the correct answer. 您会得到正确的答案。 see Use of back button feature in test kit. 请参阅测试套件中后退按钮功能的使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM