Defines an update to a tile, including its visuals, identification tag, and expiration time.
Syntax
var tileNotification = new Windows.UI.Notifications.TileNotification();
Attributes
- ActivatableAttribute(Windows.UI.Notifications.ITileNotificationFactory, NTDDI_WIN8)
- ThreadingAttribute(MTA)
- VersionAttribute(NTDDI_WIN8)
Members
The TileNotification class has these types of members:
Constructors
The TileNotification class has these constructors.
| Constructor | Description |
|---|---|
| TileNotification | Creates and initializes a new instance of the TileNotification object for use with a TileUpdater. |
Methods
The TileNotification class inherits methods from the Object class (C#/VB/C++).
Properties
The TileNotification class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the XML description of the notification content, which you can then manipulate to alter the notification. | |
| Read/write | Gets or sets the time that Windows will remove the notification from the tile. | |
| Read/write | Gets or sets a string that Windows can use to prevent duplicate notification content from appearing in the queue. |
Examples
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.tileWideText04); 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; Notifications.TileUpdateManager.createTileUpdaterForApplication().update(tileNotification); }
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
- 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
Build date: 12/4/2012