Answered by:
Navigation to new page fails

Question
-
This is somewhat specific, but I think it is a bug, so the real question is if there is a workaround. Here is the code:
protected override async void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (condtionMet) { try { Frame frm = Window.Current.Content as Frame; if (frm == null) frm = new Windows.UI.Xaml.Controls.Frame(); Window.Current.Content = frm; frm.Navigate(typeof(ErrorInfo)); Window.Current.Activate(); return; } catch { } } //some more code here }
I use this on Receive page of ShareTarget. The result is that sometimes error page is shown, and sometimes not for the same source target, but exception is never caught as code after return is never executed. Any ideas except to have more controls on the receive page and show/hide them when required, or to check condition onShareTargetActivated and then load proper page from there?
- Edited by ivan.icin Saturday, April 5, 2014 2:18 PM
Saturday, April 5, 2014 1:58 PM
Answers
-
No it is not. Thanks for checking!
Jeff Sanders (MSFT)
@jsandersrocks - Windows Store Developer Solutions @WSDevSol
Getting Started With Windows Azure Mobile Services development? Click here
Getting Started With Windows Phone or Store app development? Click here
My Team Blog: Windows Store & Phone Developer Solutions
My Blog: Http Client Protocol Issues (and other fun stuff I support)- Marked as answer by Jeff SandersMicrosoft employee, Moderator Tuesday, April 8, 2014 12:30 PM
Tuesday, April 8, 2014 12:30 PMModerator
All replies
-
Can you post a simple repro of the issue on OneDrive?
Jeff Sanders (MSFT)
@jsandersrocks - Windows Store Developer Solutions @WSDevSol
Getting Started With Windows Azure Mobile Services development? Click here
Getting Started With Windows Phone or Store app development? Click here
My Team Blog: Windows Store & Phone Developer Solutions
My Blog: Http Client Protocol Issues (and other fun stuff I support)Monday, April 7, 2014 7:24 PMModerator -
can you please be more specific in what you're asking? The only thing I can figure out is that there's an error that occurs during the share contract, and it's not being caught.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.Monday, April 7, 2014 7:25 PMModerator -
It is pretty specific
frm.Navigate(typeof(ErrorInfo)); Window.Current.Activate();
should open the page, and it doesn't happen always if you try several times in a row.Monday, April 7, 2014 8:54 PM -
I'll try sometimes later, but I have decided to use workaround for now, so I am now just curious whether this is a Windows bug or not.Monday, April 7, 2014 8:56 PM
-
No it is not. Thanks for checking!
Jeff Sanders (MSFT)
@jsandersrocks - Windows Store Developer Solutions @WSDevSol
Getting Started With Windows Azure Mobile Services development? Click here
Getting Started With Windows Phone or Store app development? Click here
My Team Blog: Windows Store & Phone Developer Solutions
My Blog: Http Client Protocol Issues (and other fun stuff I support)- Marked as answer by Jeff SandersMicrosoft employee, Moderator Tuesday, April 8, 2014 12:30 PM
Tuesday, April 8, 2014 12:30 PMModerator