Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6616535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:35:40+00:00 2026-05-25T20:35:40+00:00

Within my WP7 app, I am generating an image for a live tile and

  • 0

Within my WP7 app, I am generating an image for a live tile and saving in Isolated storage.
It is then available for my periodic task to update the live tile with and everything is working fine in this regard for the periodic task.

The problem I have is at the point in my foreground WP7 app when I create the live tile image I also update the live tile (since I know something has changed so why wait for the periodic task). But when the live tile update occurs here, it seems that it cannot find the newly created file and so presents the live tile without the bitmap.

In terms of the relevant code

Creating the file

var source = new BitmapImage(new Uri("Images/Tiles/Class Timetable with T.png", UriKind.Relative));
source.CreateOptions = BitmapCreateOptions.None;
source.ImageOpened += (sender, e) => // This is important. The image can't be rendered before it's loaded.
{
    // Create our image as a control, so it can be rendered to the WriteableBitmap.
    var newImage = new Image();
    newImage.Source = source;
    newImage.Width = 173;
    newImage.Height = 173;

    // Define the filename for our tile. Take note that a tile image *must* be saved in /Shared/ShellContent
    // or otherwise it won't display.
    var tileImage = string.Format("/Shared/ShellContent/{0}.jpg", Event.UniqueId);

    // Define the path to the isolatedstorage, so we can load our generated tile from there.
    var isoStoreTileImage = string.Format("isostore:{0}", tileImage);

and the actual save itself

// Create a stream to store our file in.
var stream = store.CreateFile(tileImage);

// Invalidate the bitmap to make it actually render.
bitmap.Invalidate();

// Save it to our stream.
bitmap.SaveJpeg(stream, 173, 173, 0, 100);

// Close the stream, and by that saving the file to the ISF.
stream.Close();

and the code that actually retrieves the image and updates the live tile (and works in the periodic task but not from the app itself

string imageString = "isostore:/Shared/ShellContent/" + nextEvent.UniqueId + ".jpg";
ShellTile defaultTile2 = ShellTile.ActiveTiles.First();
defaultTile2.Update(new StandardTileData
{
    Title = nextTime,
    BackgroundImage = (new Uri(imageString, UriKind.Absolute)),

});

Just unsure as to if I am doing something fundamentally wrong here? I am considering storing the generated image in the database with its object. And, I do have a manageable number of files involved here. I am not generating hundreds of the things.

I do have a workaround which is to update the livetile from within the WP7 app without using the image file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:35:41+00:00Added an answer on May 25, 2026 at 8:35 pm

    Hey that code looks familiar 😉 That aside, there’s nothing in the code you posted that actually can determine the problem.

    My guess is that you’re calling NotifyComplete() to early in your periodic task. For this, I recommend you use the Task Parallel Library to workaround the problem.

    I actually wrote a article about it this very morning: How To: Live Tile with Scheduled Agent

    The essential part is to use Task.ContinueWith to ensure that NotifyComplete() is first called after you finished rendering the background image, and saved it to the isolated storage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to use some custom fonts within my WP7 app. I
Is there currently a way for my WP7 app to: Scan for available audio
Within an n-tier app that makes use of a WCF service to interact with
The built-in emulator from the WP7 Tools doesn't have the Bing App installed, and
Within my Cocoa app, I call NSWorkspace's openFile: method to open some file with
Within posterous when you hover on an image it displays a box enabling the
Does anyone have some WP7 code for the animations within the ListItem descriptions that
Within a rake task how does one query the description? Something that would give:
I have WP7 app that uses the MVVM pattern. When the user goes from
currently i'm developing a WP7 that contacts a RemoteService within a BackgroundWorker. As Part

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.