Update main tile

7 posts, 0 answers
  1. prog1
    prog1 avatar
    61 posts
    Member since:
    Jul 2008

    Posted 14 Mar 2012 Link to this post

    Is it possible to update the main tile of an application with the LiveTileHelper?
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 15 Mar 2012 Link to this post

    Hello Fabian,

    Thank you for contacting us.

    Yes, you can update the tile with one of these methods:
    • CreateOrUpdateTile(RadExtendedTileData extendedTileData, Uri navigationUri)
    • UpdateTile(ShellTile tile, RadExtendedTileData extendedTileData)

    If you use the UpdateTile method, you might need to get the old tile first. You can do it with the GetTile method which takes one parameter of type Uri.

    I hope this information helps. Let me know if you need additional assistance here.

    Kind regards,

    Todor
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. prog1
    prog1 avatar
    61 posts
    Member since:
    Jul 2008

    Posted 04 Apr 2012 Link to this post

    Thank you Todor,

    but what uri does the main tile have?
    What do I get if the app has not been pinned to start?

    Kind regards
    Fabian
  5. Matthew
    Matthew avatar
    32 posts
    Member since:
    Oct 2011

    Posted 04 Apr 2012 Link to this post

    Yeah you can actually, check out the snippet below. The application tile is the first of the ShellTile.ActiveTiles collection:

    var applicationTile = ShellTile.ActiveTiles.First();
     
    LiveTileHelper.UpdateTile(applicationTile, new RadExtendedTileData { Count = 99 });

  6. Matthew
    Matthew avatar
    32 posts
    Member since:
    Oct 2011

    Posted 04 Apr 2012 Link to this post

    Oh, missed the last question. The main app tile doesn't have a URI, you can reference it in the snippet I showed above. It's there even if the app isn't pinned to start.
  7. Todor
    Admin
    Todor avatar
    778 posts

    Posted 09 Apr 2012 Link to this post

    Hello Fabian,

    The main tile also has a Uri and to get it you can also use:
    ShellTile tile = LiveTileHelper.GetTile(new Uri("/", UriKind.Relative));

    You can also use the snippet provided by Matthew. Note that the LiveTileHelper's Update method will change the main tile, but it will not force it to appear on the StartScreen, if the application is not pinned.

    All the best,
    Todor
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. prog1
    prog1 avatar
    61 posts
    Member since:
    Jul 2008

    Posted 09 Apr 2012 Link to this post

    Thank you Metthew and Todor,

    hope I can test it this week. 

    Kind regards
    Fabian


Back to Top
DevCraft banner