BadgeUpdater.Update(BadgeNotification) BadgeUpdater.Update(BadgeNotification) BadgeUpdater.Update(BadgeNotification) BadgeUpdater.Update(BadgeNotification) BadgeUpdater.Update(BadgeNotification) Method

Definition

Applies a change to the badge's glyph or number.

public : void Update(BadgeNotification notification)
void Update(BadgeNotification notification) const;
public void Update(BadgeNotification notification)
Public Sub Update(notification As BadgeNotification)
badgeUpdater.update(notification);

Parameters

notification
BadgeNotification BadgeNotification BadgeNotification

The object that supplies the new XML definition for the badge.

Examples

The following example shows the use of Update to send a numeric badge update to the calling app's tile.


function sendBadgeNotification() {
    var Notifications = Windows.UI.Notifications;
    var badgeXml;
    var badgeAttributes;

    // Get an XML DOM version of a specific template by using getTemplateContent.
    badgeXml = Notifications.BadgeUpdateManager.getTemplateContent(Notifications.BadgeTemplateType.badgeNumber);
    badgeAttributes = badgeXml.getElementsByTagName("badge");
    badgeAttributes[0].setAttribute("value", "7");

    // Create a badge notification from the XML content.
    var badgeNotification = new Notifications.BadgeNotification(badgeXml);

    // Send the badge notification to the app's tile.
    Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication().update(badgeNotification);
}

See also