The toast template catalog (Windows Store apps)

3 out of 5 rated this helpful - Rate this topic

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

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

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

 

 

Build date: 10/26/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.