1.页面传值:

 this.NavigationService.Navigate(new Uri("/SecondPage.xaml?CustomerId=1234&Product=555", UriKind.Relative));

 

        protected override void OnNavigatedTo(NavigationEventArgs e)

        {

            base.OnNavigatedTo(e);

 

            foreach (var item in NavigationContext.QueryString)

            {

                MessageBox.Show("Query String [" + item.Key + "] = " + item.Value);

            }

        }

 

或:

   this.NavigationService.Navigate(new Uri("/SecondPage.xaml#HelloWorld",

                                                    UriKind.Relative));

 

  Protected override void OnFragmentNavigation(System.Windows.Navigation.FragmentNavigationEventArgs e)

        {

            base.OnFragmentNavigation(e);

 

            MessageBox.Show("Fragment: " + e.Fragment);

        }

 

2.在非页面层调用页面跳转: 

       //跳转页面

      (Application.Current.RootVisual as Microsoft.Phone.Controls.PhoneApplicationFrame

      ).Navigate(new Uri("/MainPages/SecondPages/GameDetails.xaml", UriKind.Relative));

最新文章

  1. Spring boot mybatis项目启动后一直刷日志的bug修复……
  2. Java -- File
  3. hadoop MapReduce 工作机制
  4. linux第4天 shell socket
  5. php求文件的相对路径
  6. 跨平台c++ Coroutine,仿unity3d实现
  7. 在HTML文件中加载js
  8. 济南学习 Day 3 T1 am
  9. HDOJ(HDU) 2106 decimal system(进制相互转换问题)
  10. SQLServer 扫盲
  11. hello nodejs
  12. ios deprecated 警告消除 强迫症的选择
  13. JavaSE(十一)之异常处理详解
  14. python从零开始 -- 第0篇之Hello World!
  15. QPainter绘制遇到的小问题
  16. PAT基础6-1
  17. css sticker footer
  18. MFC (如何通过点击botton打开一个文件夹/文件)
  19. pbft流程深层分析和解释(转)
  20. android 登录效果

热门文章

  1. PLSQL_PLSQL调优健康检查脚本SQLHC(案例)
  2. OpenCV实现KNN算法
  3. 【转】C++ 单例模式
  4. Java多线程之银行出纳员仿真
  5. ubuntu vnc install
  6. Citrix 服务器虚拟化之二十一 桌面虚拟化之部署Provisioning Services
  7. ZooKeeper3.4.6配置
  8. (转)C# MD5
  9. Arch Linux 修改主机名称
  10. PHP 文件读取 fread、fgets、fgetc、file_get_contents 与 file 函数