0
当用户离开我的页面导航,然后使用后退按钮返回页面时,我希望将它们重定向到不同的页面,有没有办法可以做到这一点?在Windows Phone上中断后退按钮
当用户离开我的页面导航,然后使用后退按钮返回页面时,我希望将它们重定向到不同的页面,有没有办法可以做到这一点?在Windows Phone上中断后退按钮
是的,用快速的谷歌搜索或StackOverflow搜索,你会发现它。但是,因为我心情很好:
protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
{
if (DecoderPrompt.IsOpen)
{
e.Cancel = true;
// Navigate to different page:
NavigationService.Navigate(new Uri("/View/YourView.xaml", UriKind.Relative));
}