RadPhoneApplicationFrame backstack not working and Navigating event triggered twice.

4 posts, 0 answers
  1. Ryan
    Ryan avatar
    21 posts
    Member since:
    Apr 2013

    Posted 15 Aug 2013 Link to this post

    Hi,

    I recently tried switching to the RadPhoneApplicationFrame (previously using the WPToolkit TransitionFrame), however I have run into two issues that I can't seem to understand.

    1. When moving forward through pages, the Navigating event from the RadPhoneApplicationFrame is triggered twice (navigating backwards it's triggered once).

    2. Previously when I navigated to another page and didn't want to keep the old page in the navigation stack, I would call NavigationService.RemoveBackEntry() after the NavigationService.Navigate() to discard it. The allowed me to replace the current page instead of having to navigate back twice. This function doesn't appear to work using the RadPhoneApplicationFrame.

    Thanks
    Ryan
  2. Ryan
    Ryan avatar
    21 posts
    Member since:
    Apr 2013

    Posted 15 Aug 2013 Link to this post

    So it seems the RemoveBackEntry() only effects the backstack after the navigation page has loaded so I was able to change my logic to fix this.
  3. DevCraft banner
  4. Ryan
    Ryan avatar
    21 posts
    Member since:
    Apr 2013

    Posted 17 Aug 2013 Link to this post

    So some further investigation into the RadPhoneApplicationFrame is showing some more strange behaviour.

    For each page navigation, the NavigationStopped event is being fired. Now this event should only be flagged if:
    1. The StopLoading() method is called.
    2. A new navigation is requested while the current navigation is in progress

    I see it called through the following backtrace:

    WeightWorkout.DLL!WeightWorkout.App.NavStopped(object sender, System.Windows.Navigation.NavigationEventArgs e) Line 252 C#
    Microsoft.Phone.ni.dll!System.Windows.Navigation.NavigationService.RaiseNavigationStopped(object content, System.Uri uri, System.Windows.Navigation.NavigationMode mode)    Unknown
    Microsoft.Phone.ni.dll!System.Windows.Navigation.NavigationService.Navigate(System.Uri source)  Unknown
    WeightWorkout.DLL!MyApp.MainPage.Exercise_Selected(object sender, System.Windows.Controls.SelectionChangedEventArgs e) Line 137 C#

    Now neither of these should be occurring so I'm unsure why this event is being fired. This is causing some problem in my code as I am using the event to see if something has gone wrong. I have worked around the problem however the cause still concerns me.

    This behaviour is reproducable in the telerik example app. Just attached to the NavigationStopped event and you will see it being triggered.
  5. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 20 Aug 2013 Link to this post

    Hi Ryan,

    Thanks for writing.

    This event is expected to fire since we are internally stopping the navigation to play the transition and start the navigation again after the transition finishes.

    Regards,
    Deyan
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top
DevCraft banner