BadgeNotification(XmlDocument) コンストラクター

定義

BadgeNotification の新しいインスタンスを作成して初期化します。

public:
 BadgeNotification(XmlDocument ^ content);
 BadgeNotification(XmlDocument const& content);
public BadgeNotification(XmlDocument content);
function BadgeNotification(content)
Public Sub New (content As XmlDocument)

パラメーター

content
XmlDocument

バッジの更新を定義する XML コンテンツ。

次のコード例では、BadgeNotification メソッドを使用して数値バッジ通知を作成します。

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);

注釈

value 属性には、1 から 99 の数値または状態グリフを指定できます。 使用可能な画像の完全な一覧については、 バッジの概要 に関するページを参照してください。

適用対象

こちらもご覧ください