question

AnkurTripathi-8361 avatar image
0 Votes"
AnkurTripathi-8361 asked ·

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.

uwp
· 2
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, I haven't heard from you for a long time, have you solved your issue? If not, can my answer be helpful?

0 Votes 0 · ·

Hi, is there any update? Have you solved your issue?

0 Votes 0 · ·
FayWang-MSFT avatar image
1 Vote"
FayWang-MSFT answered ·

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!

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MangoApps-1236 avatar image
0 Votes"
MangoApps-1236 answered ·

Is there a way to change color of that badge?

· 1 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Currently, there seems no api can directly change the color of that badge.

0 Votes 0 · ·