lzn1007

windows通用app开发入门-页面间导航

  • 导航到指定页面

Frame.Navigate(typeof(NewPage));

  • 传递参数

Frame.Navigate(typeof(PasswordDetail), index);

  • 接收参数

protected override void OnNavigatedTo(NavigationEventArgs e)

{

  int i= (int)e.Parameter;

}

  • 清除导航缓存,避免按返回键时导航到上一个界面

protected override void OnNavigatedTo(NavigationEventArgs e)

{

  Frame rootFrame = Window.Current.Content as Frame;

  rootFrame.BackStack.Clear();

 

  base.OnNavigatedTo(e);

}

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2021-06-18
  • 2021-12-03
  • 2021-09-22
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2022-12-23
  • 2022-02-14
  • 2022-01-18
  • 2022-12-23
  • 2021-09-12
相关资源
相似解决方案