Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. //Creates update data with images that were just saved
  2. FlipTileData ftd = new FlipTileData()
  3. {
  4. Title = String.Empty,
  5. BackTitle = String.Empty,
  6. Count = 0,
  7. SmallBackgroundImage = new Uri(string.Format("isostore:{0}", sfname), UriKind.Absolute),
  8. BackgroundImage = new Uri(string.Format("isostore:{0}", lffname), UriKind.Absolute),
  9. BackBackgroundImage = new Uri(string.Format("isostore:{0}", lbfname), UriKind.Absolute),
  10. WideBackgroundImage = new Uri(string.Format("isostore:{0}", wffname), UriKind.Absolute),
  11. WideBackBackgroundImage = new Uri(string.Format("isostore:{0}", wbfname), UriKind.Absolute),
  12. };
  13.  
  14. //Updates secondary tile
  15. var secondaryTile = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("tile=1"));
  16. if (secondaryTile != null)
  17. {
  18. secondaryTile.Update(ftd);
  19. }
  20. else
  21. {
  22. ShellTile.Create(new Uri("/MainPage.xaml?tile=1", UriKind.Relative), ftd, true);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement