toast

Base toast element, which contains at least a single visual element.

Element hierarchy

<toast>

Syntax

<toast launch?   = string
       duration? = "long" | "short" >

  <!-- Child elements -->
  visual,
  audio?,
  commands?

</toast>

Key

?   optional (zero or one)

Attributes and Elements

Attributes

AttributeDescriptionData typeRequiredDefault value
duration

The amount of time the toast should display.

This attribute can have one of the following values:

  • long
  • short
NoNone
launch

A string that is passed to the application when it is activated by the toast. The format and contents of this string are defined by the app for its own use. When the user taps or clicks the toast to launch its associated app, the launch string provides the context to the app that allows it to show the user a view relevant to the toast content, rather than launching in its default way.

stringNoNone

 

Child Elements

Child ElementDescription
audio

Specifies a sound to play when a toast notification is displayed. This element also allows you to mute any toast notification audio.

commands

Specifies that the toast notification is being used to indicate an incoming call or an alarm, with appropriate commands associated with each scenario.

visual

Contains a single binding element that defines a toast.

 

Parent Elements

This outermost (document) element may not be contained by any other elements.

Requirements

Namespace

http://schemas.microsoft.com/notifications/2012/toast.xsd

 

 

Show:
© 2014 Microsoft