Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. private static void UpdateTile(List<Post> posts)
  2. {
  3. var updater = TileUpdateManager.CreateTileUpdaterForApplication();
  4. updater.EnableNotificationQueue(true);
  5. updater.Clear();
  6. foreach (var post in posts)
  7. {
  8. var bindingContent = new TileBindingContentAdaptive
  9. {
  10. BackgroundImage = new TileBackgroundImage {Source = new TileImageSource(post.PreviewUrl)}
  11. };
  12. var binding = new TileBinding
  13. {
  14. Branding = TileBranding.None,
  15. Content = bindingContent
  16. };
  17. var content = new TileContent
  18. {
  19. Visual = new TileVisual
  20. {
  21. TileMedium = binding,
  22. TileWide = binding,
  23. TileLarge = binding
  24. }
  25. };
  26. updater.Update(new TileNotification(content.GetXml()));
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement