TileNotification TileNotification TileNotification TileNotification TileNotification Class


Defines an update to a tile, including its visuals, identification tag, and expiration time.

public : sealed class TileNotification
struct winrt::Windows::UI::Notifications::TileNotification
public sealed class TileNotification
Public NotInheritable Class TileNotification
var tileNotification = new tileNotification(content);

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


The following example uses the TileNotification constructor to create a new instance, then uses the ExpirationTime property to show a tile notification for 30 seconds.

function tileNotificationExpiration() {
    var Notifications = Windows.UI.Notifications;
    var tileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWide310x150Text04);

    var currentTime = new Date();
    var seconds = 30;

    var tileTextAttributes = tileXml.getElementsByTagName("text");
    tileTextAttributes[0].appendChild(tileXml.createTextNode("This notification will expire at " + new Date(currentTime.getTime() + seconds * 1000)));

    var tileNotification = new Notifications.TileNotification(tileXml);

    // Set the expiration time on the notification
    var expiryTime = new Date(currentTime.getTime() + seconds * 1000);

    tileNotification.expirationTime = expiryTime;


TileNotification(XmlDocument) TileNotification(XmlDocument) TileNotification(XmlDocument) TileNotification(XmlDocument) TileNotification(XmlDocument)

Creates and initializes a new instance of the TileNotification object for use with a TileUpdater.


Content Content Content Content Content

Gets the XML description of the notification content, which you can then manipulate to alter the notification.

ExpirationTime ExpirationTime ExpirationTime ExpirationTime ExpirationTime

Gets or sets the time that Windows will remove the notification from the tile. By default, a tile update does not expire. It is a best practice to explicitly set an expiration time to avoid stale content.

Tag Tag Tag Tag Tag

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

See also