This is a migrated thread and some comments may be shown as answers.

RadPhoneApplicationFrame backstack not working and Navigating event triggered twice.

3 Answers 40 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan
Top achievements
Rank 1
Ryan asked on 16 Aug 2013, 12:14 AM
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

3 Answers, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 16 Aug 2013, 03:42 AM
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.
0
Ryan
Top achievements
Rank 1
answered on 18 Aug 2013, 01:24 AM
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.
0
Deyan
Telerik team
answered on 20 Aug 2013, 01:05 PM
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.
Tags
General Discussions
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or