Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9219875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:13:00+00:00 2026-06-18T03:13:00+00:00

In some case in my application, I have to cancel back navigation. I’m doing

  • 0

In some case in my application, I have to cancel back navigation. I’m doing it with code:

    protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
    {
        if (e.NavigationMode == NavigationMode.Back)
        {
            if (WaitPanelGrid.Visibility == System.Windows.Visibility.Visible)
            {
                e.Cancel = true;
            }
        }
        base.OnNavigatingFrom(e);
    }

And everything is OK, except one thing: In this page i have transitions:

<toolkit:TransitionService.NavigationInTransition>
    <toolkit:NavigationInTransition>
        <toolkit:NavigationInTransition.Backward>
            <toolkit:TurnstileTransition Mode="BackwardIn" />
        </toolkit:NavigationInTransition.Backward>
        <toolkit:NavigationInTransition.Forward>
            <toolkit:TurnstileTransition Mode="ForwardIn" />
        </toolkit:NavigationInTransition.Forward>
    </toolkit:NavigationInTransition>
</toolkit:TransitionService.NavigationInTransition>
<toolkit:TransitionService.NavigationOutTransition>
    <toolkit:NavigationOutTransition>
        <toolkit:NavigationOutTransition.Backward>
            <toolkit:TurnstileTransition Mode="BackwardOut" />
        </toolkit:NavigationOutTransition.Backward>
        <toolkit:NavigationOutTransition.Forward>
            <toolkit:TurnstileTransition Mode="ForwardOut" />
        </toolkit:NavigationOutTransition.Forward>
    </toolkit:NavigationOutTransition>
</toolkit:TransitionService.NavigationOutTransition>

And calling Cancel in OnNavigatingFrom stop application from navigate back, but transition is still working, so in the end i have just black screen, because page was not changed, but it was animated and moved somewhere behind screen.

My question is: How I can cancel navigating AND transition?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:13:01+00:00Added an answer on June 18, 2026 at 3:13 am

    Excerpt from this article

    Disabling navigation transitions

    If you want to disable navigation transitions for a Page, set TransitionService.NavigationInTransition and TransitionService.NavigationOutTransition to null on the Page. If you want to restore those values, just store them beforehand and then set them again.

    PhoneApplicationFrame frame = (PhoneApplicationFrame)Application.Current.RootVisual;
    
    PhoneApplicationPage page = (PhoneApplicationPage)frame.Content;
    
    // Save the transitions
    
    NavigationInTransition oldIn = TransitionService.GetNavigationInTransition(page);
    
    NavigationOutTransition oldOut = TransitionService.GetNavigationOutTransition(page);
    
    // Clear the transitions
    
    TransitionService.SetNavigationInTransition(page, null);
    
    TransitionService.SetNavigationOutTransition(page, null);
    
    // Restore the transitions
    
    TransitionService.SetNavigationInTransition(page, oldIn);
    
    TransitionService.SetNavigationOutTransition(page, oldOut);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have application with needs to have access to some sensitive data(in this case
This is a minimal test case of some code that I actually have. It
I have a CLI application, which is digging some data, in case of need,
I need to cancel my asyncthread . In my application I am doing some
I have a queryset containing some objects. Depending on some case or the other
My code in scala template: @session.get(user.id) match { case Some(_) => xx case _
In my application I have several persisted models and in one case I'm getting
I'm troubleshooting some weird behavior of a threaded application and have stumbled upon a
In my application I have a rather large object created from some XML files.
I'm working on a WebCenter Spaces application and have observed some strange behaviour in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.