Is there a way to change color of that badge?
UWP how to blink in Taskbar?
UWP how to blink in Taskbar
I am using C# / UWP to make an application. In that application, I want to blink the window if a particular event occurs so that the user of that application knows that something happened. How can I get this in my C# UWP application?
Like in Yahoo Messenger, if you get a message then the message window blinks to get your focus, I want to use that effect in my application.
2 answers
Sort by: Newest
-
-
Fay Wang - MSFT 5,196 Reputation points
2019-12-03T07:41:15.503+00:00 Hello,
Welcome to our Microsoft Q&A platform!
Currently, there seems no api can blink your app's icon in Taskbar. If you want to achieve some eye-catching effects, you can use notification or make notification badges appear on your app's taskbar icon, but it is a static effect without animation. For more details, you can refer to this document.
private void updateBadgeGlyph() { string badgeGlyphValue = "attention"; XmlDocument badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeGlyph); Windows.Data.Xml.Dom.XmlElement badgeElement = badgeXml.SelectSingleNode("/badge") as Windows.Data.Xml.Dom.XmlElement; badgeElement.SetAttribute("value", badgeGlyphValue); BadgeNotification badge = new BadgeNotification(badgeXml); BadgeUpdater badgeUpdater = BadgeUpdateManager.CreateBadgeUpdaterForApplication(); badgeUpdater.Update(badge); }
Thanks!