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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:30:08+00:00 2026-06-08T07:30:08+00:00

I created a Windows Phone application, In that i need to create the custom

  • 0

I created a Windows Phone application, In that i need to create the custom tile and update it from program

I created a User control,

 <TextBlock x:Name="Count" Foreground="White" FontFamily="Segoe WP Bold" FontSize="80" Text="{Binding Count}" HorizontalAlignment="Right" Margin="0,0,10,0"/>
 <TextBlock HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="0,0,0,0" Grid.Row="1" Text="Tile Demo" Foreground="White" FontFamily="Segoe WP Semibold" FontSize="35" />

from my MainPage.xaml.cs file i am binding the count then i am converting the User control into a .jpg file and storing in the ISO Store. Like below

 public void CreateOrUpdateTile(int count) 
 {
 CustomNotificationTile frontTile = new CustomNotificationTile();
 TileData tileData = new TileData() { Count = count };
 frontTile.DataContext = tileData;

 //frontTile.Count.Text = count.ToString();

 frontTile.Measure(new Size(173, 173));
 frontTile.Arrange(new Rect(0, 0, 173, 173));
 var bmp = new WriteableBitmap(173, 173);
 bmp.Render(frontTile, null);
 bmp.Invalidate();

 var isf = IsolatedStorageFile.GetUserStoreForApplication();
 var filename = "/Shared/ShellContent/Tile.jpg";

 if (!isf.DirectoryExists("/Shared/ShellContent"))
 {
        isf.CreateDirectory("/Shared/ShellContent");
 }

 using (var stream = isf.OpenFile(filename, System.IO.FileMode.OpenOrCreate))
 {
 bmp.SaveJpeg(stream, 173, 173, 0, 100);
 }


 ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("TileID=2"));

 //test if Tile was created
 if (TileToFind == null)
 {
       StandardTileData NewTileData = new StandardTileData
       {
             BackgroundImage = new Uri("isostore:" + filename, UriKind.Absolute),
             BackBackgroundImage = new Uri("Application_TileImage_173x173.png", UriKind.Relative)
       };

       ShellTile.Create(new Uri("/MainPage.xaml?TileID=2", UriKind.Relative), NewTileData);
       }

 #region Update the Tile Not Working as expected

        else
        {
            StandardTileData NewTileData = new StandardTileData
            {
                BackgroundImage = new Uri("isostore:" + filename, UriKind.Absolute)
            };
            TileToFind.Update(NewTileData);
        }

        #endregion
  }

Problem:

My problem is first i am calling from constructor to create the tile with some dummy data, Its Working as expected

But when i try to update the Tile from other methods its not working, those methods i am calling from page_load event

Those methods will fetch data from a WCF service, i am updating the Tile from the completed event of the WCF service method like below

Service.getProductsCountAsync();

Service.getProductsCountCompleted += (o,e) => { 
int count = e.Result;
Dispatcher.BeginInvoke(() =>
        {
            CreateOrUpdateTile(count);
        });
};

When the controller hit the above code, I only seeing the number with black background, Tile count is updating but the background color and logo are changing, I don’t know why its happening but need to solve as early as possible.

I think the problem might be updating the UI from the background thread, but i don’t know how to overcome that

Following are the images which will taken before method calls and after method calls

Before

Before Updating

After

After service call

  • 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-08T07:30:09+00:00Added an answer on June 8, 2026 at 7:30 am

    Its working

    We have to Bind the Background color, Logo also dynamically like count even though they are static

    After that it is working as expected

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

Sidebar

Related Questions

My app is a windows phone 7 application. In that i have created a
I need to create a website launcher application for Windows Phone 7. Basically, it
I have created a windows phone 7 custom class library, in that I have
We have created a C# windows form application that uses an ActiveX control to
I have created windows phone gap application. In that it internally uses browser called
I have created a Windows Phone 7.5 Silverlight application. Most of the design and
I have created an windows phone 7 app. I need to test it in
I was following the How-To Create a Basic Local Database Application for Windows Phone
In my Windows Phone application( silverlight application ), I want the user to automatically
I have the following simple custom control that I have defined for a Windows

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.