BadgeNotification(XmlDocument) BadgeNotification(XmlDocument) BadgeNotification(XmlDocument) BadgeNotification(XmlDocument) BadgeNotification(XmlDocument) Constructor

Definition

Creates and initializes a new instance of the BadgeNotification.

public : BadgeNotification(XmlDocument content)
BadgeNotification(XmlDocument content) const;
public BadgeNotification(XmlDocument content)
Public Sub New(content As XmlDocument)
var badgeNotification = new badgeNotification(content);

Parameters

content
XmlDocument XmlDocument XmlDocument

The XML content that defines the badge update.

Examples

The following example code uses the BadgeNotification method to create a numeric badge notification.


var Notifications = Windows.UI.Notifications;

var badgeXml = Notifications.BadgeUpdateManager.getTemplateContent(Notifications.BadgeTemplateType.badgeNumber);
var badgeAttributes = badgeXml.getElementsByTagName("badge");
badgeAttributes[0].setAttribute("value", "26");

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

Remarks

The value attribute can be a number from 1-99 or a status glyph. See the Badge overview for a complete list of available images.

See also