windows phone7中的导航 [英] Navigation in windows phone7

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

问题描述

哪种导航最适合应用程序中的主页按钮,任何人都可以帮助我,我是新手?

What kind of navigation is best suited for a home button in an application,Can any please help me,I am newbie?

推荐答案

这行得通.

  1. 我全局声明了一个在类中设置为 false 的布尔变量.

  1. Globally I declared a Boolean variable set to false in a class.

然后,无论何时单击主页按钮,bool 变量都会设置为 true 并返回.

Then whenever the home button is clicked bool variable is set as true and navigated back.

Modules.HomeClick = true;
NavigationService.GoBack();

  • 然后在页面加载事件的每个页面中,我检查了条件是否 bool 变量为 true 返回.

  • Then in every page for page loaded event I checked condition if bool variable true go back.

    if (Modules.HomeClick=true)
    this.NavigationService.GoBack();
    

  • 这些在每个页面中完成,直到主页.这不存储 backstack.

    these done in every page till homepage.This do not store backstack.

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

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