Please login to access all of the features of the Community Site.

ShowToast

M v4.0

This command displays a "Toast" style message, often used to show quick and temporary messages, such as "saved" or "updated" and things of the sort.

If the CommandParameter is a string, it will display using the default styles with the command parameter as the message to display. For more control, pass a ShowToastParameters object.

Properties

PropertyTypeDescription
TextstringThe text to display in the Toast.
DurationToastDurationEither long (3.5 seconds) or short (2.0 seconds).
FontSizeintThe font size of the toast.

Examples

<Button Text="Toast Me"
    Command="{Binding ShowToast}"
    CommandParameter="Default Toast styling." />
<Button Text="Toast Me 2"
    Command="{Binding ShowToast}"
    CommandParameter="{Rock:ShowToastParameters Text='Butter or jam?', Duration='Long', FontSize='32'}" />