2016-12-25 3 views
1

プロジェクトユニバーサルアプリケーションを作成したとき、タスクバーのアイコンにアスタリスクをつけて、あるイベントについてユーザーに通知する必要があります。それは新しいメッセージを受け取ったときにスカイププレビューアプリのように見えます(タスクバーにアスタリスクが表示されます)。 ユニバーサルアプリケーションでアスタリスク(アスタリスク)を設定する方法を教えてもらえますか?タスクバーにアスタリスクを設定する方法は、skype previewアプリのように見えますか?

答えて

0

documentationから)次のコードは、それを行う必要があります。

private void updateBadgeGlyph() { 
    string badgeGlyphValue = "alert"; 

    // Get the blank badge XML payload for a badge glyph 
    XmlDocument badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeGlyph); 

    // Set the value of the badge in the XML to our glyph value 
    Windows.Data.Xml.Dom.XmlElement badgeElement = badgeXml.SelectSingleNode("/badge") as Windows.Data.Xml.Dom.XmlElement; 
    badgeElement.SetAttribute("value", badgeGlyphValue); 

    // Create the badge notification 
    BadgeNotification badge = new BadgeNotification(badgeXml); 

    // Create the badge updater for the application 
    BadgeUpdater badgeUpdater = BadgeUpdateManager.CreateBadgeUpdaterForApplication(); 

    // And update the badge 
    badgeUpdater.Update(badge); 
} 

またはあなたはまた、タイルのレイアウトを作成するための有用である、それのためにNotificationsExtensionsを使用することができます。

関連する問題