BadgeUpdateManager.CreateBadgeUpdaterForApplication BadgeUpdateManager.CreateBadgeUpdaterForApplication BadgeUpdateManager.CreateBadgeUpdaterForApplication BadgeUpdateManager.CreateBadgeUpdaterForApplication BadgeUpdateManager.CreateBadgeUpdaterForApplication Method

Definition

Overloads

CreateBadgeUpdaterForApplication() CreateBadgeUpdaterForApplication() CreateBadgeUpdaterForApplication() CreateBadgeUpdaterForApplication() CreateBadgeUpdaterForApplication()

Creates and initializes a new instance of the BadgeUpdater, which lets you change the appearance or content of the badge on the calling app's tile.

CreateBadgeUpdaterForApplication(String) CreateBadgeUpdaterForApplication(String) CreateBadgeUpdaterForApplication(String) CreateBadgeUpdaterForApplication(String) CreateBadgeUpdaterForApplication(String)

Creates and initializes a new instance of the BadgeUpdater for a specified app tile's badge, usually the tile of another app in the package. The BadgeUpdater lets you change the appearance or content of that badge.

CreateBadgeUpdaterForApplication() CreateBadgeUpdaterForApplication() CreateBadgeUpdaterForApplication() CreateBadgeUpdaterForApplication() CreateBadgeUpdaterForApplication()

Creates and initializes a new instance of the BadgeUpdater, which lets you change the appearance or content of the badge on the calling app's tile.

public : static BadgeUpdater CreateBadgeUpdaterForApplication()
static BadgeUpdater CreateBadgeUpdaterForApplication() const;
public static BadgeUpdater CreateBadgeUpdaterForApplication()
Public Shared Function CreateBadgeUpdaterForApplication() As BadgeUpdater
var badgeUpdater = Windows.UI.Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication();

Returns

The object you will use to send changes to the app tile's badge.

Examples

The following example shows CreateBadgeUpdaterForApplication used 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

CreateBadgeUpdaterForApplication(String) CreateBadgeUpdaterForApplication(String) CreateBadgeUpdaterForApplication(String) CreateBadgeUpdaterForApplication(String) CreateBadgeUpdaterForApplication(String)

Creates and initializes a new instance of the BadgeUpdater for a specified app tile's badge, usually the tile of another app in the package. The BadgeUpdater lets you change the appearance or content of that badge.

public : static BadgeUpdater CreateBadgeUpdaterForApplication(Platform::String applicationId)
static BadgeUpdater CreateBadgeUpdaterForApplication(winrt::hstring applicationId) const;
public static BadgeUpdater CreateBadgeUpdaterForApplication(String applicationId)
Public Shared Function CreateBadgeUpdaterForApplication(applicationId As String) As BadgeUpdater
var badgeUpdater = Windows.UI.Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication(applicationId);

Parameters

applicationId
String String String

The unique ID of the tile whose badge you want to update.

Returns

The object you will use to send changes to the application tile's badge.

Remarks

The app identified by applicationId must belong to the same package as the caller.

See also