remote image as VisualElement within backgroundagent

2 posts, 0 answers
  1. Stefano
    Stefano avatar
    3 posts
    Member since:
    Apr 2013

    Posted 05 Aug 2013 Link to this post

    I'm trying to add as VisualElement of he tile a user control that uses a remote hosted image, when creating or updating the tile from within the App it works great and I'm able to see the image, but when doing same from a backgroundAgent the image is not being set.

    this is the code in the background agent:

    Deployment.Current.Dispatcher.BeginInvoke(() =>


    // set the tile

    AvatarTile avatarTile = new AvatarTile(PSNProf);

    RadFlipTileData tiledata = new RadFlipTileData();

    tiledata.Count = new Random().Next(99);

    tiledata.VisualElement = avatarTile;

    LiveTileHelper.UpdateTile(tile2Update, tiledata);


    PD: AvatarTile is the UserControl with image and other UIElements
    how can accomplish to update the tile with the image from the background agent?

    Thanks for your attention

  2. Deyan
    Deyan avatar
    2026 posts

    Posted 08 Aug 2013 Link to this post

    Hi Stefano,

    Thanks for writing back.

    I guess you have an Image element within your UserControl which is bound to the Uri of your remote image. The Image element downloads the image asynchronously and displays it as soon as it is put into the Silverlight Visual Tree. This is not the case in the background agent and therefore you do not see the image. You will have to manually download the image from the Uri, create a BitmapImage object from it and set it as a source to the Image element so that it renders.

    I hope this helps.

    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
Back to Top