tomasslavicek

Windows Phone live tiles

Sep 15th, 2013
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1. /// <summary>
  2. /// Vrátí objekt StandardTileData s nastavenými správnými obrázky
  3. /// - obrázky musí být předem vygenerovány v metodě SetImageToLiveTile(); tato metoda bývá volána po ní...
  4. /// </summary>
  5. public static StandardTileData GenerateTileData(string textureFileName1, string textureFileName2, bool firstTile, bool secondTile)
  6. {
  7.     StandardTileData tileData = new StandardTileData();
  8.     if (firstTile)
  9.     {
  10.         tileData.Title = "";
  11.         tileData.BackgroundImage = new Uri("isostore:/Shared/ShellContent/" + textureFileName1);
  12.     }
  13.     else
  14.     {
  15.         tileData.Title = AppResources.name;
  16.         tileData.BackgroundImage = new Uri("/173x173_transparent.png", UriKind.Relative);
  17.     }
  18.  
  19.     // A případně i 2. stranu...
  20.     tileData.BackTitle = "";
  21.     if (secondTile)
  22.         tileData.BackBackgroundImage = new Uri("isostore:/Shared/ShellContent/" + textureFileName2);
  23.     else
  24.         tileData.BackBackgroundImage = new Uri("", UriKind.Relative);
  25.     return tileData;
  26. }
Add Comment
Please, Sign In to add comment