action (Toast XML Schema)
Specifies a button shown in a toast.
Element hierarchy
Syntax
<action content = string
arguments = string
activationType? = "foreground" | "background" | "protocol"
afterActivationBehavior? = "default" | "pendingUpdate"
placement? = "contextMenu"
imageUri? = string
hint-inputid = string
hint-buttonStyle = "Success" | "Critical"
hint-toolTip = string
/>
Key
?
optional (zero or one)
Attributes and Elements
Attributes
Attribute | Description | Data type | Required | Default value |
---|---|---|---|---|
content | The content displayed on the button. | string | Yes | None |
arguments | App-defined string of arguments that the app will later receive if the user clicks this button. | string | Yes | None |
type | An argument string that can be passed to the associated app to provide specifics about the action that it should execute in response to the user action. | string | Yes | None |
activationType | Decides the type of activation that will be used when the user interacts with a specific action.
|
string | No | "foreground" |
afterActivationBehavior | Specifies the behavior that the toast should use when the user takes action on the toast.
|
string | No | "default" |
placement | When set to "contextMenu", the action becomes a context menu action added to the toast notification's context menu rather than a traditional toast button. | string | No | None |
imageUri | The URI of the image source for a toast button icon. These icons are white transparent 16x16 pixel images at 100% scaling and should have no padding included in the image itself. If you choose to provide icons on a toast notification, you must provide icons for ALL of your buttons in the notification, as it transforms the style of your buttons into icon buttons. Use one of the following protocol handlers:
|
string | No | None |
hint-inputId | Set to the Id of an input to position button beside the input. | string | No | None |
hint-buttonStyle | The button style. useButtonStyle must be set to true in the toast element.
|
string | No | None |
hint-toolTip | The tooltip for a button, if the button has an empty content string. | string | No | None |
Child Elements
None
Parent Elements
Parent Element | Description |
---|---|
actions | Container element for declaring up to five inputs and up to five button actions for the toast notification. |
See also