Skip to main content
TileNotification.ExpirationTime | expirationTime property

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.


var expirationTime = tileNotification.expirationTime;
tileNotification.expirationTime = expirationTime;

public Nullable<DateTimeOffset> ExpirationTime { get; set; }

Public Property ExpirationTime As Nullable(Of DateTimeOffset)

property IReference<DateTime>^ ExpirationTime { 
   IReference<DateTime>^ get();
   void set (IReference<DateTime>^ value);

Property value

Type: IReference<DateTime> [JavaScript/C++] | System.Nullable<DateTime> [.NET]

The date and time that the notification should be removed.


The following example uses ExpirationTime 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;

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0 [for Xbox, see UWP features that aren't yet supported on Xbox]

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


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



Requirements (Windows 8.x and Windows Phone 8.x)

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]


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



See also

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