0

ユーザーが私のページから離れて、戻るボタンを使用してページに戻ったときに、別のページにリダイレクトしたいのですが、それを行う方法はありますか?

4

1 に答える 1

0

はい、簡単な Google 検索または 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));
    }
于 2012-08-06T06:25:20.303 に答える