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

Navigation is not allowed crash.

3 Answers 95 Views
Animation
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
MNP
Top achievements
Rank 1
MNP asked on 20 Apr 2011, 02:00 AM
Can duplicate. I have a simple setup where I set the animation to be a RadTileAnimation to a container in a list box.

this.SetValue(RadTileAnimation.ContainerToAnimateProperty, this.TileContainerListBox);

If this case, the tile does a EmailComposeTask(). It works fine if I let the animation run, but if I "double tap"..ie. tap it again before the email compose screen comes up, it crashes with the following:

Navigation is not allowed when the task is not in the foreground. Error: -2147220990
 
ErrorStackTrace=   at Microsoft.Phone.Shell.Interop.ShellPageManagerNativeMethods.CheckHResult(Int32 hr)   at Microsoft.Phone.Shell.Interop.ShellPageManager.NavigateTo(ShellPage page)   at System.Windows.Navigation.Journal.AddHistoryPoint(JournalEntry journalEntry)   at System.Windows.Navigation.NavigationService.Navigate(Uri source)   at System.Windows.Controls.Frame.Navigate(Uri source)   at Telerik.Windows.Controls.RadPhoneApplicationFrame.TransitionControl_OldContentTransitionEnded(Object sender, EventArgs e)   at Telerik.Windows.Controls.RadTransitionControl.OnOldContentTransitionEnded()   at Telerik.Windows.Controls.RadTransitionControl.OldContentAnimation_Ended(Object sender, EventArgs e)   at Telerik.Windows.Controls.RadAnimation.OnEnded()   at Telerik.Windows.Controls.RadTileAnimation.OnEnded()   at Telerik.Windows.Controls.RadAnimation.OnStopped(PlayAnimationInfo info)   at Telerik.Windows.Controls.RadAnimationManager.StopStoryboard(PlayAnimationInfo info)   at Telerik.Windows.Controls.RadAnimationManager.OnStoryboardCompleted(Object sender, EventArgs e)   at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

Let me know if you need anything more.

-Matt

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 20 Apr 2011, 06:58 AM
Hello Matt,

Thanks for contacting us and for sending the stack trace of the issue that you experience.

Based on the stack trace we could only guess what might cause this exception. Therefore we would kindly like to ask you to prepare a sample Windows Phone 7 application that we can use to reproduce the case and directly see what goes wrong.

Please note that you will have to open a new support ticket in order to be able to attach a project.

Thanks for your understanding and for the time taken.

Best wishes,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
MNP
Top achievements
Rank 1
answered on 20 Apr 2011, 11:08 PM
Hi Deyan,

In Telerik's WP7 example, if you modify the PhoneApplicationFrame > Wizard > TileTransitionStartPage.xaml to the following,

private void DoNavigate()
    {
        this.SetValue(RadTileAnimation.ContainerToAnimateProperty, this.TileContainerListBox);
 
        //MainViewModel.Instance.MainFrame.Navigate(new Uri("/PhoneApplicationFrame/Wizard/TileTransitionEndPage.xaml", UriKind.RelativeOrAbsolute));
     
        EmailComposeTask email = new EmailComposeTask();
        email.To = "support@bnid.ca";
        email.Subject = "WP7 Own This World Support";
        email.Body = "Hey BNID Admin, I'm having an issue with Own This World...";
 
        email.Show();
 
    }
Then, double tap, or tap 2 times quickly it will crash. (This is on 2011 Q1 SP1 as well). 

If you put a try/catch around the EmailComposeTask, it will catch it, however I think the underlying problem is the animation is taking the tap a 2nd time causing the call again, which errors out because the current window is now the email window.

Let me know if you still want a small project.

-Matt
0
Valentin.Stoychev
Telerik team
answered on 25 Apr 2011, 09:22 AM
Hello Matt,

You need to set a check in your code, so that when the EmailTask is open -> to not open it again.

The exception is thrown from the WP7 framework - it do not allows to open a new email task when one is already opened.


Kind regards,
Valentin.Stoychev
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Animation
Asked by
MNP
Top achievements
Rank 1
Answers by
Deyan
Telerik team
MNP
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Share this question
or