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);

}

 

分类:

技术点:

相关文章:

  • 2021-08-25
  • 2021-11-06
  • 2021-11-05
  • 2021-12-14
  • 2021-12-14
  • 2021-12-15
  • 2021-11-08
  • 2021-12-15
猜你喜欢
  • 2021-12-05
  • 2021-08-25
  • 2021-11-05
  • 2021-12-17
  • 2021-11-27
  • 2021-09-11
  • 2021-11-27
相关资源
相似解决方案