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 9097593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:09:15+00:00 2026-06-17T00:09:15+00:00

In my Windows Phone app’s main page, users can click a button to do

  • 0

In my Windows Phone app’s main page, users can click a button to do some stuff and that will trigger the live tile to update.

The problem I am having is, if the user clicks the button and then hit the phone’s Back button really quickly, the live tile sometimes will not render properly. This issue rarely happens, but it does happen and when it happens it just looks bad…

enter image description here

The way I implement the live tile is, create a user control that looks exactly the same as the live tile and then save it to isolated storage. Then retrieve it and store it in a FliptileData object. Finally I call the Update method on the ShellTile. Please see the following piece of code to demonstrate the process.

    // the function that saves the user control to isolated storage
    public Uri SaveJpegToIsolatedStorage(FrameworkElement tile, string suffix, int tileWidth = 336, int tileHeight = 336)
    {
        var bmp = new WriteableBitmap(tileWidth, tileHeight);

        // Force the content to layout itself properly
        tile.Measure(new Size(tileWidth, tileHeight));
        tile.Arrange(new Rect(0, 0, tileWidth, tileHeight));

        bmp.Render(tile, null);
        bmp.Invalidate();

        // Obtain the virtual store for the application
        IsolatedStorageFile myStore = IsolatedStorageFile.GetUserStoreForApplication();
        using (IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream(IsolatedStorageFileName + suffix, FileMode.Create, myStore))
        {
            try
            {
                bmp.SaveJpeg(fileStream, tileWidth, tileHeight, 0, 100);
            }
            catch (Exception)
            {
                return null;
            }
        }

        return new Uri("isostore:/" + IsolatedStorageFileName + suffix, UriKind.Absolute);
    }

    // save the user control to isolated storage and prepare the FlipTileData object
    wideFrontTileImage = SaveJpegToIsolatedStorage((UserControl)this.WideFrontTile, "_wide_front", 691);
    var flipTileData = new FlipTileData();
    flipTileData.WideBackgroundImage = wideFrontTileImage;
    return flipTileData;

    // update the live tile
   var shellTile = ShellTile.ActiveTiles.FirstOrDefault();
   shellTile.Update(customTile.GetFlipTileData(data.UndoneMemosCount == "0" && data.TotalMemosCount == "0"));

I think the reason that’s causing all this is, when the user clicks the Back button too quickly, the OS terminates all the processes running within the app and the rendering wasn’t done at that time. I’m thinking if there’s a way to know when the rendering is finished, so I can cancel the Back button and wait until it’s finished then manually exit the app. But I simply dunno how…

Any help on this one will be greatly appreciated!

  • 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-06-17T00:09:16+00:00Added an answer on June 17, 2026 at 12:09 am

    I have ran into similar issue in my WP8 app. The problem was that I was updating my Tile in ApplicationDeactivated event handler. The thing is you should not update your tiles there, but rather in your MainPage.OnNavigatedFrom override. Once I changed this, it works just fine.

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

Sidebar

Related Questions

I am debugging my Windows Phone app for some crashes that I can only
I am developing a Windows Phone app where users can update a list. Each
My windows phone app is freezing while loading the main page. I have set
I've done some reading and found that one can only close a windows phone
I have developed a windows phone app that sends notification to users. There is
I am developing a Windows Phone app that requires users to type in valid
I am working on creating a Windows Phone app that will play a series
I'm building a Windows Phone app and I can't make a dynamically created Button
It's a little strange that my Windows Phone App will exit without any Warning
So, Ive made Windows Phone app that contains rss-feeds. I would now like to

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.