导航回来 [英] Navigate back

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

问题描述

我正在开发一个Windows Phone 8.1应用程序,在MainPage中我在&borderbsptaped中使用以下内容事件:
$

I am developing a Windows Phone 8.1 app, and in MainPage I use the following in a border_tapped event:

Frame.Navigate(typeof(AnswerPage));

然后我运行应用程序,然后单击MainPage中的一个按钮,它应该从MainPage到AnswerPage。但是如何在按下后退按钮时让应用程序返回MainPage?现在它关闭了应用程序。

Then I run the app, and click a button in the MainPage and it goes from MainPage to AnswerPage as it should. But how to make the app go back to MainPage when hitting the back button? Now it closes the app.

BR / Magnus

BR /Magnus

Magnus Burk

Magnus Burk

推荐答案

根据我的有限知识,您需要处理后退按钮事件并处理后退和前进堆栈。最简单的方法是使用Basic模板,因为有一个为它编写的导航处理程序。
Based on my limited knowledge, you need to handle the back button event and work on the back and forward stacks. Easiest way is to use Basic template as there's a navigation handler written for it.


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

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