by Corrado Cavalli via Corrado's BLogs on 11/24/2011 9:26:08 AM
Adding a secondary tile that ‘deep links’ into your application is a trivial task and can be done in just a few lines of code…
private void button1_Click(object sender, RoutedEventArgs e){ ShellTile tile = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString() == "/Page2.xaml"); if (tile == null) { StandardTileData secondaryTile = new StandardTileData { Title = "My app", BackgroundImage = new Uri("/ApplicationIcon.png", UriKind.Relative), Count = 13, BackTitle = "News", BackBackgroundImage = null, BackContent = "Something happened on the way to heaven..." }; ShellTile.Create(new Uri("/Page2.xaml", UriKind.Relative), secondaryTile); }}
The problem now is: How can I debug my application when launched from a secondary tile since debugger gets detached once you click it?
The smarter solution I’ve seen is to temporarily add a background task, this way debugger remains attached and you can continue debugging as usual, here are the steps:
That’s all: now you can launch your app, close it on emulator and see that it is still running and ready to trigger any breakpoint once you hit the secondary tile.
Hope it helps!
Original Post: Debug a Windows Phone application invoked from a secondary tile
The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.