Badges
Tiles, whether “live” or not and regardless of size, support a numeric or graphical badge that overlays status on the corner. For example, a numeric badge is used by the Mail app to show the number of new messages. On a PC, graphical badges can be used for some limited additional scenarios, such as showing the user’s online status in a chat app. Badges are the only form of dynamic content supported by the small tile size.
Applying a badge looks much like updating a tile, but even simpler. The following UpdateBadge
method places a badge with the number two on the app’s tile, with differences from the previous UpdateTile
method highlighted:
void UpdateBadge() { // This is the badge template string xmlString ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.