How to schedule a tile notification (XAML)
This topic shows how to schedule a tile notification to appear at a specific time.
- Windows Runtime
- A working knowledge of tile and notification terms and concepts. For more information, see Tiles, Badges, and Notifications.
- The ability to create a basic Windows Store app with C# or C++ Microsoft Visual Basic using Windows Runtime APIs. For more information, see Create your first Windows Store app using C# or Visual Basic.
Windows.UI.Notifications includes the tile APIs.
Before you can specify the delivery time, you must create the notification.
TileTemplateType tileTemplate = TileTemplateType.TileSquare150x150Text01; XmlDocument tileXml = TileUpdateManager.GetTemplateContent(tileTemplate);
We won't cover this here because it's the same for a scheduled notification as for a non-scheduled notification. For more information, see Quickstart: Sending a tile update.
This example specifies that the notification should appear in 3 hours. This example uses the DateTime object.
Send the tile notification content and the scheduled delivery time to the constructor.
This ID must be 16 characters or less.
Create the TileUpdater object, which in turn is used to add your notification to the schedule.