This is a migrated thread and some comments may be shown as answers.

Update main tile

6 Answers 92 Views
LiveTileHelper
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
prog1
Top achievements
Rank 1
prog1 asked on 14 Mar 2012, 06:56 PM
Is it possible to update the main tile of an application with the LiveTileHelper?

6 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 15 Mar 2012, 05:18 PM
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 >>
0
prog1
Top achievements
Rank 1
answered on 04 Apr 2012, 08:10 AM
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
0
Matthew
Top achievements
Rank 1
answered on 04 Apr 2012, 11:50 AM

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 });

0
Matthew
Top achievements
Rank 1
answered on 04 Apr 2012, 09:30 PM
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.
0
Todor
Telerik team
answered on 09 Apr 2012, 11:18 AM
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 >>

0
prog1
Top achievements
Rank 1
answered on 09 Apr 2012, 11:34 AM
Thank you Metthew and Todor,

hope I can test it this week. 

Kind regards
Fabian


Tags
LiveTileHelper
Asked by
prog1
Top achievements
Rank 1
Answers by
Todor
Telerik team
prog1
Top achievements
Rank 1
Matthew
Top achievements
Rank 1
Share this question
or