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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:58:06+00:00 2026-06-10T01:58:06+00:00

I am attempting to populate a secondary tile background with an image saved from

  • 0

I am attempting to populate a secondary tile background with an image saved from the PhotoChooserTask, but for some reason I cannot accomplish this. I have referenced a lot of sites but I have not found the proper implementation. All I do is call PhotoChooserTask, and then on the completed event I save the resulting image to isolated storage to be loaded later. This has worked with a HubTile in my application, but for some reason I cannot append the image to a secondary tile. So far what I have is as follows:

MainPage.xaml.cs

string imageFolder = @"\Shared\ShellContent";
string shareJPEG = "shareImage.jpg";

public MainPage()
    {
        InitializeComponent();

        photoChooserTask = new PhotoChooserTask();
        photoChooserTask.Completed += new EventHandler<PhotoResult>(photoChooserTask_Completed);
    }

public void changePictureMenuItem_Tap(object sender, System.Windows.Input.GestureEventArgs e)
    {     
        try
        {
            photoChooserTask.Show();
        }
        catch (System.InvalidOperationException)
        {
            MessageBox.Show("An error occurred");
        }
    }

    void photoChooserTask_Completed(object sender, PhotoResult e)
    {
        if (e.TaskResult == TaskResult.OK)
        {
              //persist the data in isolated storage
                    using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
                    {
                        if(!myIsolatedStorage.DirectoryExists(imageFolder))
                        {
                            myIsolatedStorage.CreateDirectory(imageFolder);
                        }

                        if (myIsolatedStorage.FileExists(shareJPEG))
                        {
                            myIsolatedStorage.DeleteFile(shareJPEG);
                        }

                        string filePath = System.IO.Path.Combine(imageFolder, shareJPEG);
                        IsolatedStorageFileStream fileStream = myIsolatedStorage.CreateFile(filePath);

                        BitmapImage bitmap = new BitmapImage();
                        bitmap.SetSource(e.ChosenPhoto);
                        WriteableBitmap wb = new WriteableBitmap(bitmap);

                        // Encode WriteableBitmap object to a JPEG stream. 
                        Extensions.SaveJpeg(wb, fileStream, 173, 173, 0, 100);

                        fileStream.Close();
                    }
        }
    }    

private void CreateLiveTile(TileItem item)
    {
        //IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication();
        var title = item.Title.ToString();
        string tileParameter = "Param=" + item.Title.ToString();

        ShellTile Tile = CheckIfTileExist(tileParameter);  // Check if Tile's title has been used             

        if (Tile == null)
        {   
            //this is not working?             
            background = new Uri(@"isostore:/Shared/ShellContent/shareJPEG.png", UriKind.Absolute);
            //background = new Uri("isostore:/Shared/ShellContent/shareJPEG.png", UriKind.Absolute);

            try
            {
                var LiveTile = new StandardTileData
                {
                    Title = item.TileName,                        
                    BackgroundImage = background,  //not working
                    BackTitle = item.TileName,    
                    BackBackgroundImage = new Uri("/background.png", UriKind.Relative),
                    BackContent = item.Message,
                };

                ShellTile.Create(new Uri("/MainPage.xaml?" + tileParameter, UriKind.Relative), LiveTile);                      
        }
    }

Ultimately, the secondary tile is created but there is no image for the BackgroundImage. How would I properly call the isolated strorage path to set the BackgroundImage of the secondary tile accordingly? Or is there something else I should be doing or change?

  • 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-10T01:58:07+00:00Added an answer on June 10, 2026 at 1:58 am

    MainPage.xaml.cs

    string imageFolder = @"\Shared\ShellContent"; 
    string shareJPEG = "shareImage.jpg"; 
    
    ...
    
    private void CreateLiveTile(TileItem item)  
    {   
        var title = item.Title.ToString();  
        string tileParameter = "Param=" + item.Title.ToString();  
    
        ShellTile Tile = CheckIfTileExist(tileParameter);  // Check if Tile's title has been used               
    
        if (Tile == null)  
        {        
            string filePath = System.IO.Path.Combine(imageFolder, shareJPEG);                
            background = new Uri(@"isostore" + filePath, UriKind.Absolute);    //this worked
    
            ...
    
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to populate a drop down from an Nhibernate object, but having problems
I’m attempting to use the values from one JSON link to populate values in
Attempting to use the data series from this example no longer passes the JSONLint
I am attempting to populate one NSMutableArray with objects from a second NSMutableArray while
Some background: I am attempting to create a DirectShow source filter based on the
I am attempting to manually populate an image icon into a window nested in
i'm attempting to populate an array with random numbers, but the random numbers must
I am attempting to populate a DataGridView cell with an image. The image is
I'm using this android calendar http://w2davids.wordpress.com/android-simple-calendar/ and attempting to populate it with events. In
I am new at this. I am trying to populate a datagrid from a

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.