Defines the visual content and timing for a single, non-recurring scheduled update to a tile.
Syntax
var scheduledTileNotification = new Windows.UI.Notifications.ScheduledTileNotification();
Attributes
- ActivatableAttribute(Windows.UI.Notifications.IScheduledTileNotificationFactory, NTDDI_WIN8)
- ThreadingAttribute(MTA)
- VersionAttribute(NTDDI_WIN8)
Members
The ScheduledTileNotification class has these types of members:
Constructors
The ScheduledTileNotification class has these constructors.
| Constructor | Description |
|---|---|
| ScheduledTileNotification | Creates and initializes a new instance of the ScheduledTileNotification object for use with a TileUpdater. |
Methods
The ScheduledTileNotification class inherits methods from the Object class (C#/VB/C++).
Properties
The ScheduledTileNotification class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the XML description of the content of the scheduled tile update. | |
| Read-only | Gets the time at which the tile is scheduled to be updated. | |
| Read/write | Gets or sets the time after which the tile notification should no longer be shown. | |
| Read/write | Gets or sets the unique ID that is used to identify the scheduled tile in the schedule. | |
| 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 shows a tile scheduled to display in one hour.
var Notifications = Windows.UI.Notifications; var currentTime = new Date(); var seconds = 60; var dueTime = new Date(currentTime.getTime() + seconds * 60 * 1000); var idNumber = Math.floor(Math.random() * 100000000); // Generates a unique ID number for the notification. var tileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWideText09); // Set up the wide tile text. var tileTextAttributes = tileXml.getElementsByTagName("text"); tileTextAttributes[0].appendChild(tileXml.createTextNode("This is a scheduled notification")); tileTextAttributes[1].appendChild(tileXml.createTextNode("Received: " + dueTime.toLocaleTimeString())); // Set up the square tile text. var squareTileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileSquareText04); var squareTileTextAttributes = squareTileXml.getElementsByTagName("text"); squareTileTextAttributes[0].appendChild(squareTileXml.createTextNode("This is a scheduled notification")); // Include the square tile in the notification. var node = tileXml.importNode(squareTileXml.getElementsByTagName("binding").item(0), true); tileXml.getElementsByTagName("visual").item(0).appendChild(node); // Create the notification object. var futureTile = new Notifications.ScheduledTileNotification(tileXml, dueTime); futureTile.id = "Tile" + idNumber; // Add to the schedule. Notifications.TileUpdateManager.createTileUpdaterForApplication().addToSchedule(futureTile);
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
- ScheduledTileNotification
- Scheduled notifications sample
- Tile schema
- Guidelines and checklist for scheduled notifications
Build date: 12/4/2012