This question is locked. New answers and comments are not allowed.
For some reason using RadPhoneApplicationFrame with CM causes OnDeactivate to fire twice when navigating to another Page when the ViewModel inherits from Screen.
If I set:
radPhoneApplicationFrame.HoldNavigationUntilExitTransitionIsFinished = false;
...the problem goes away but the transitions don't work properly.
update: I figured out why this happens but I'm not sure how to fix it yet.
"I noticed that when using the RadPhoneApplicationFrame, OnDeactivate will fire twice when navigating. This happens because the RadPhoneApplicationFrame registers the Navigating event and by default it saves off the target Uri and cancels navigation so the transition animation can complete. Once that happens it navigates to the saved off Uri which causes OnDeactivate to fire again."
A possible fix might be to register the Navigating event in the ctor instead of the Loaded event.
If I set:
radPhoneApplicationFrame.HoldNavigationUntilExitTransitionIsFinished = false;
...the problem goes away but the transitions don't work properly.
update: I figured out why this happens but I'm not sure how to fix it yet.
"I noticed that when using the RadPhoneApplicationFrame, OnDeactivate will fire twice when navigating. This happens because the RadPhoneApplicationFrame registers the Navigating event and by default it saves off the target Uri and cancels navigation so the transition animation can complete. Once that happens it navigates to the saved off Uri which causes OnDeactivate to fire again."
A possible fix might be to register the Navigating event in the ctor instead of the Loaded event.
private void RadPhoneApplicationFrame_Loaded(object sender, RoutedEventArgs e)
{
base.Navigating += new NavigatingCancelEventHandler(this.OnNavigating);
this.HookOrientationChanged();
}