Guidelines to display toast notifications RRS feed

  • Question

  • In the documentation of MSDN (for toasts) it was mentioned that toasts should not be used to display critical alerts that need immediate user attention. In this case, the information should be displayed in the app or the tile. But the app may be suspended and the tile may not be visible to the user so toast is the only choice.

    I was wondering how 'Windows Defender' or 'Windows Firewall' handles this situation when a critical toast needing immediate user attention is required. 
    Friday, October 7, 2011 3:18 PM


All replies

  • A toast by definition is a message that is displayed briefly and then goes away on its own.  It the app is suspended, it will not be sending toasts anyhow.  If you have an app that is a critical app like defender, they you should design this as a Desktop app and not a Metro Style app.  It can then send messages via the tray notification.

    Jeff Sanders (MSFT)
    Friday, October 7, 2011 6:31 PM
  • There can be a background task that shows toasts no? Is the toast clickable (and the app showing showing the toast gets click notification)? Or the sole purpose of the toast is to show a notification and the user is responsible for opening the app.

    Just writing a desktop app doesnt solve the problem unfortunately. If 'Windows Firewall' or Defender wants the user to take an action on something it has detected (like a malware\trojan) and if the user is on Metro UI, how is the messaging going to work? Without  a toast, the user will have no idea that a user action is needed for Defender\Firewall to act upon a malware detection. And if user spends all his\her time on Metro, such desktop apps are potentially hosed for ever?

    Friday, October 7, 2011 6:43 PM
  • Standby for more information about how desktop applications will interact in this way.  We have not released any Windows 8 Desktop application programming information as of yet.


    Jeff Sanders (MSFT)
    Friday, October 14, 2011 12:44 PM
  • To expand this question, how to  send messages via the tray notification with desktop app? Another, what time release windows 8 Desktop application programming information?
    Monday, October 17, 2011 6:53 AM
  • I also would like to know what happens to those critical alerts if the user on the Metro mode has switched off the app alerts...?
    Friday, October 21, 2011 9:52 PM
  • Users have the ultimate control over whether they see toasts or not.  If the user turns off app alerts then the user will not receive app alerts.  There is no guarantee that a user will see a toast, so they shouldn't be used as the sole channel to communicate critical events.

    As the guidelines suggest, if it is critical that the user sees a notification then the notification needs to be displayed somewhere persistent so it is still available when the user is ready to look.  Tiles and the app itself are the only such places.

    A toast can be used as an additional means, but there is no way to ensure the user will see the toast: toasts may be turned off, the user may be looking away, etc.


    Friday, October 21, 2011 10:56 PM
  • I am very much interested in this topic, since our application may require the user's immediate attention. Currently we have small notification windows that show up on top of all other apps, where the user can take an action or ignore it. Pretty much similar to the Outlook incoming email notification.

    Is there a way to notify the user about an imminent action while the user is in another Metro UI application?

    My Windows Phone will display an incoming call on top of any other running app for instance. Is there something similar for Windows 8?



    Tuesday, November 22, 2011 2:52 AM
  • Standby for more information about how desktop applications will interact in this way. We have not released any Windows 8 Desktop application programming information as of yet.


    Jeff Sanders (MSFT)
    Wednesday, November 30, 2011 3:02 PM
  • Is there any update about toast on Windows 8 Consumer Preview?

    Is following volume notification belongs to toast? How to show it in desktop application?

    volume notify

     notification sample

    Sunday, March 4, 2012 3:27 AM
  • Sunday, March 4, 2012 3:31 AM
  • That's great, thanks for quickly response!!
    Sunday, March 4, 2012 3:57 AM
  • Hi there!

    One question: Is it possible to change the background and text color of a toast notification send from a desktop application? I did not find anything in the docu...

    Thursday, March 8, 2012 2:08 PM
  • The samples require Visual Studio 11 to build. Is there a way to build toast notification code with Visual Studio 10 by any chance? I don't want to migrate our entire solution to VS 2011, just so we can show a toast from our desktop app... Any thoughts?

    Tuesday, March 13, 2012 4:36 PM
  • You should be able to use VS10. The code in How to enable desktop toast notifications through an AppUserModelID is straight COM, not C++/Cx.

    You would need to convert the actual sample (I didn't check, but this could be as simple as copying the source files into a VS10 project) and you may need newer header files than were included in VS10.


    Tuesday, March 13, 2012 4:45 PM
  • As far as I can tell, in order to use toast, I need to add a new dependency (something .winmd) and only VS 11 recognizes .winmd files and can add them as dependencies to my C# project. I haven't tried C++.
    Friday, April 6, 2012 6:36 PM
  • The C++ Sending toast notifications from desktop apps sample is pure COM and doesn't rely on a winmd file. It should work fine in VS2010 plus the Windows 8 SDK, although it may need some updating if the sample uses new C++ syntax that wasn't available in the older version (nothing jumps out at me, but I don't have VS2010 handy to check).

    The C# sample does rely on the winmd file for the Windows Runtime class metadata. You should still be able to send a toast from C# in an older compiler, but you may need to write the pinvoke signatures and runtime-callable wrappers yourself.

    You might also try spliting your project and write an assembly with VS11 which can be called from the VS10 assemblies.


    Monday, April 9, 2012 10:33 PM