i have a problem with a secondary live tile. I pin it within my application and i want
that it get the user to a deep link, where he pinned it.
In the App.xaml.cs file i add this to the onlaunched event:
if (rootFrame.Content == null)
{
// Wenn der Navigationsstapel nicht wiederhergestellt wird, zur ersten Seite navigieren
// und die neue Seite konfigurieren, indem die erforderlichen Informationen als Navigationsparameter
// übergeben werden
if (!string.IsNullOrEmpty(args.Arguments))
{
rootFrame.Navigate(typeof(qurandb));//, args.Arguments);
}
else
{
// rootFrame.Navigate(typeof(qurandb), args.Arguments);
rootFrame.Navigate(typeof(GroupedItemsPage), "AllGroups");
}
/* if (!rootFrame.Navigate(typeof(GroupedItemsPage), "AllGroups"))
{
throw new Exception("Failed to create initial page");
} */
}
My problem is, that this is only working when the app is launched for the first time. When i click later on the secondary tile (the app is resume), i dont get to the destination i want, but to the point, where i was when i suspended the app.
Can anybody help me with this?
An app’s OnLaunched event will be called when the secondary tile is clicked upon. The code you provided assumes that it will only be called when
rootFrame.Contentis null, and is not navigating to the appropriate page if your app is already running. The code needs to handle the case where the frame content is not null.