Skip to main content

Windows Dev Center

TileUpdater.Update | update method

Applies a change in content or appearance to the tile.

Syntax


tileUpdater.update(notification);

public void Update(
  TileNotification notification
)

Public Sub Update(
  notification As TileNotification 
)

public:
void Update(
  TileNotification^ notification
)

Parameters

notification

Type: TileNotification

The object that supplies the new XML definition for the tile's content.

Examples

The following example shows Update used to send a notification to the app's tile.


function sendTileTextNotification() {
    var Notifications = Windows.UI.Notifications;

    // Get an XML DOM version of a specific template by using getTemplateContent.
    var tileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWide310x150Text03);

    // You will need to look at the template documentation to know how many text fields a particular template has.
    // Get the text attribute for this template and fill it in.
    var tileAttributes = tileXml.getElementsByTagName("text");
    tileAttributes[0].appendChild(tileXml.createTextNode("Hello World!"));

    // Create the notification from the XML.
    var tileNotification = new Notifications.TileNotification(tileXml);

    // Send the notification to the calling app's tile.
    Notifications.TileUpdateManager.createTileUpdaterForApplication().update(tileNotification);
}

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

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]

Namespace

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

Metadata

Windows.winmd

See also

TileUpdater
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 use the notification queue with local notifications
How to set up periodic notifications for tiles
Tiles XML schema