January 24th, 2017

Why do my program’s notifications sometimes show a small icon, and sometimes a large icon?

A customer wanted to know why their program’s notifications sometimes show a small icon, like this:

✉︎ You’ve got mail.
✉︎ 🔊︎ 🔋︎ …

And sometimes it shows a large icon, like this:

🎂️ It’s Bob’s birthday today.
Contoso
✉︎ 🔊︎ 🔋︎ …

And why does it sometimes show the program name?

If the program does not specify an icon for its notification, then the system will use the icon from the notification area to identify the source of the notification. That’s what you see in the first example.

On the other hand, if the program specifies a custom icon for its notification, then we show that custom icon, but we show it a bit larger, so that it looks different from any icon that already exists in the notification area. And since there is nothing to tie the notification visually to the icon in the notification area that generated it, we label the notification with the program so the user knows where it came from.

Topics
Code

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.