Mostrare una tile dall'isolated storage con Windows Phone 7.1


/ Published in: C#
Save to your folder(s)

Mostrare una tile dall'isolated storage con Windows Phone 7.1


Copy this code and paste it in your HTML
  1. WebClient client = new WebClient();
  2. client.OpenReadCompleted += (sender, event) => {
  3. using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication())
  4. {
  5. using (Stream tileStream = storage.CreateFile("Shared/ShellContent/tile.png"))
  6. {
  7. evt.Result.CopyTo(tileStream);
  8. }
  9. }
  10.  
  11. ShellTile tile = ShellTile.ActiveTiles.First();
  12. tile.Update(new StandardTileData
  13. {
  14. BackgroundImage = new Uri("isostore:/Shared/ShellContent/tile.png")
  15. });
  16. };
  17. client.OpenReadAsync(new Uri("http://forum.aspitalia.com/avatars/90/Ricciolo.avatar"));

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.