locked
Windows 10 toast notifications template style RRS feed

  • Question

  • Hi,

    I have enabled my application to display toast notifications on Windows 8 and later OS, following the steps mentioned in this article:

    https://code.msdn.microsoft.com/windowsdesktop/Sending-toast-notifications-71e230a2/sourcecode?fileId=51046&pathId=1435720579

    I am using the following template for the toast style: ToastTemplateType_ToastText01, reference: https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.notifications.toasttemplatetype. You can see that this particular style can be used to display a "A single string wrapped across three lines of text".

    This is working well on Windows 8, however on Windows 10, my toast text is getting reduced to two lines of text.

    Question is whether this toast style is supported on Windows 10 or should I be using a different style that will give me three lines of text on both Windows 8 and 10 OS? I don't need to display an image, just three lines of text is what I need.

    Thanks.

    Wednesday, September 16, 2015 6:36 AM

Answers

  • Hi Venkat,

    I can reproduce the issue by the sample with ToastTemplateType_ToastText01 template, only two lines of text displayed on the toast.

    However I'm not sure if the ToastTemplat will still works fine with Win10, ref from the blog:http://blogs.msdn.com/b/tiles_and_toasts/archive/2015/07/09/quickstart-sending-a-local-toast-notification-and-handling-activations-from-it-windows-10.aspx

    In Windows 8/8.1, you used to be required to choose a template from the system-provided template catalog that fits the needs of your content – one of the templates in ToastTemplateType enumeration. In Windows 10, that’s not the case anymore. The number of text lines, optional profile picture that replaces the logo, and optional inline picture, can all be managed by using the new flexible and adaptive toast templates – ToastGeneric. See the adaptive and interactive toast documentation for more information.

    Also the sample you are referring is for Win8.1 instead of Win10, I cannot make sure if there is some change on Win10, I will further try to find out any possible solutions.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Jamles Hez Wednesday, September 23, 2015 1:45 AM
    • Unproposed as answer by Jamles Hez Wednesday, September 23, 2015 1:45 AM
    • Proposed as answer by Jamles Hez Tuesday, September 29, 2015 3:12 AM
    • Marked as answer by Venkat Gorla Tuesday, October 6, 2015 4:46 AM
    Thursday, September 17, 2015 6:26 AM

All replies

  • Hi Venkat,

    I can reproduce the issue by the sample with ToastTemplateType_ToastText01 template, only two lines of text displayed on the toast.

    However I'm not sure if the ToastTemplat will still works fine with Win10, ref from the blog:http://blogs.msdn.com/b/tiles_and_toasts/archive/2015/07/09/quickstart-sending-a-local-toast-notification-and-handling-activations-from-it-windows-10.aspx

    In Windows 8/8.1, you used to be required to choose a template from the system-provided template catalog that fits the needs of your content – one of the templates in ToastTemplateType enumeration. In Windows 10, that’s not the case anymore. The number of text lines, optional profile picture that replaces the logo, and optional inline picture, can all be managed by using the new flexible and adaptive toast templates – ToastGeneric. See the adaptive and interactive toast documentation for more information.

    Also the sample you are referring is for Win8.1 instead of Win10, I cannot make sure if there is some change on Win10, I will further try to find out any possible solutions.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Jamles Hez Wednesday, September 23, 2015 1:45 AM
    • Unproposed as answer by Jamles Hez Wednesday, September 23, 2015 1:45 AM
    • Proposed as answer by Jamles Hez Tuesday, September 29, 2015 3:12 AM
    • Marked as answer by Venkat Gorla Tuesday, October 6, 2015 4:46 AM
    Thursday, September 17, 2015 6:26 AM
  • Thanks James, the links you provided in your response are quite helpful. I will take a deeper look at them.
    Monday, September 21, 2015 9:28 AM
  • Hi James,

    Windows 8 had two different desktops, the normal Windows 7 style desktop and the start screen with the live tiles. On the desktop there was support for both balloon notifications via Shell_NotifyIcon and toast notifications using the various templates documented on msdn.com.

    However on Windows 10 it seems that there is one desktop only (one that combines both the start menu and live tiles). I have also found out that balloon notifications displayed using Shell_NotifyIcon have the look and feel of a toast notification.

    So my questions related to Windows 10 are:

    Is Shell_NotifyIcon a Microsoft recommended way of displaying a notification or is it being provided only for the sake of backward compatibility and may be deprecated in the future?

    I am asking this question primarily to reduce my implementation cost. I already have code in my product that displays balloon notifications using Shell_NotifyIcon. If it gives me the look and feel of a toast notification on Windows 10, I can simply reuse that code instead of using the new notifications API on Windows 10.

    Thanks,

    Venkat 

    Tuesday, September 29, 2015 10:12 AM
  • Hi James,

    I added toast notifications to my product on Windows 8 for two reasons:

    - Get the look and feel of the new toast notifications on Windows 8.
    - Interactive toast notifications that can be displayed on the start screen (live tiles screen) of Windows 8.

    However on Windows 10 (based on what I have seen and read), there seems to be a single desktop that combines both the older start menu and the newer start screen with the live tiles.

    If that is the case, I don't have a need to display interactive notifications. Additionally balloon notifications displayed using Shell_NotifyIcon actually have the same look and feel of a toast notification.

    While I can certainly investigate the Windows 10 toast documentation and modify my code accordingly, falling back to Shell_NotifyIcon seems like a simple solution.

    Please advise if Shell_NotifyIcon is still a supported mechanism for Windows 10 or if there is a chance it will get deprecated in a future release of Windows.

    Thanks,
    Venkat


    Wednesday, September 30, 2015 4:21 AM