TileNotification.Tag | tag property

Applies to Windows and Windows Phone

Gets or sets a string that Windows can use to prevent duplicate notification content from appearing in the queue.

Syntax


var tag = tileNotification.tag;
tileNotification.tag = tag;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

A string of 16 characters or less (plus a terminating null character) that identifies the notification in the stack. While there is no set form to the string content, we recommend that it should relate to the content of the notification.

Remarks

Use tags to replace notifications in the stack. If a new notification arrives with the same tag as an existing notification, the new notification replaces the old. For instance, if your tile shows stock prices, you want to show the most up-to-date info. An existing stock price update waiting in the queue to be displayed should be replaced by the latest quotes rather than showing them one after the other.

A new notification with a matching tag replaces any existing notification with the same tag, but the new notification does not necessarily inherit the older notification's place in the queue.

The tag should relate to the content of the notification. For example, a notification in a stock quote app could use the stock symbol (such as "msft") while a weather app notification could be tagged with the zip code (such as "98052") of the forecast. Do not simply number your notifications as "notification1", "notification2" and so on.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.UI.Notifications
Windows::UI::Notifications [C++]

Metadata

Windows.winmd

See also

TileNotification
How to use the notification queue with local notifications
App tiles and badges sample
Quickstart: Sending a tile update
Tile and tile notification overview
The tile template catalog
Guidelines and checklist for tiles
How to schedule a tile notification
How to set up periodic notifications for tiles
Tiles XML schema

 

 

Show:
© 2014 Microsoft. All rights reserved.