The toast template catalog (Windows Runtime apps)

Applies to Windows and Windows Phone

This topic lists the templates available for use in a toast notification, with pictorial examples of each together with their XML content.

  • Applies to Windows Phone

You can send any toast template to Windows Phone 8.1, but it will be rendered as a modified version of ToastText02, with no image, two text strings (both on the same line, the first string in bold), and the app's Square 150x150 logo. An example is shown here:

Example phone toast

Text-only templates

ToastText01

A single string wrapped across a maximum of three lines of text.

Example

ToastText01 example

Example XML

<toast>
    <visual>
        <binding template="ToastText01">
            <text id="1">bodyText</text>
        </binding>  
    </visual>
</toast>

 

ToastText02

One string of bold text on the first line, one string of regular text wrapped across the second and third lines.

Example

ToastText02 example

Example XML

<toast>
    <visual>
        <binding template="ToastText02">
            <text id="1">headlineText</text>
            <text id="2">bodyText</text>
        </binding>  
    </visual>
</toast>

 

ToastText03

One string of bold text wrapped across the first and second lines, one string of regular text on the third line.

Example

ToastText03 example

Example XML

<toast>
    <visual>
        <binding template="ToastText03">
            <text id="1">headlineText</text>
            <text id="2">bodyText</text>
        </binding>  
    </visual>
</toast>

 

ToastText04

One string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line.

Example

ToastText04 example

Example XML

<toast>
    <visual>
        <binding template="ToastText04">
            <text id="1">headlineText</text>
            <text id="2">bodyText1</text>
            <text id="3">bodyText2</text>
        </binding>  
    </visual>
</toast>

 

Image-and-text templates

  • Applies to Windows Phone

Windows Phone toasts do not display the image in these templates, replacing it with a small logo.

In this set of templates, the image element is expressed using one of these protocols:

  • http:// or https://

    A web-based image.

  • ms-appx:///

    An image included in the app package.

  • ms-appdata:///local/

    An image saved to local storage.

  • file:///

    A local image. (Only supported for desktop apps.)

ToastImageAndText01

An image and a single string wrapped across a maximum of three lines of text.

Example

ToastImageAndText01 example

Example XML

<toast>
    <visual>
        <binding template="ToastImageAndText01">
            <image id="1" src="image1" alt="image1"/>
            <text id="1">bodyText</text>
        </binding>  
    </visual>
</toast>

 

ToastImageAndText02

An image, one string of bold text on the first line, one string of regular text wrapped across the second and third lines.

Example

ToastImageAndText02 example

Example XML

<toast>
    <visual>
        <binding template="ToastImageAndText02">
            <image id="1" src="image1" alt="image1"/>
            <text id="1">headlineText</text>
            <text id="2">bodyText</text>
        </binding>  
    </visual>
</toast>

 

ToastImageAndText03

An image, one string of bold text wrapped across the first two lines, one string of regular text on the third line.

Example

ToastImageAndText03 example

Example XML

<toast>
    <visual>
        <binding template="ToastImageAndText03">
            <image id="1" src="image1" alt="image1"/>
            <text id="1">headlineText</text>
            <text id="2">bodyText</text>
        </binding>  
    </visual>
</toast>

 

ToastImageAndText04

An image, one string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line.

Example

ToastImageAndText04 example

Example XML

<toast>
    <visual>
        <binding template="ToastImageAndText04">
            <image id="1" src="image1" alt="image1"/>
            <text id="1">headlineText</text>
            <text id="2">bodyText1</text>
            <text id="3">bodyText2</text>
        </binding>  
    </visual>
</toast>

 

Related topics

ToastTemplateType enumeration
Quickstart: Sending a toast notification
The toast audio options catalog
Toast XML schema
Toast notifications sample
Toast notification overview

 

 

Show:
© 2014 Microsoft. All rights reserved.