Edit

Share via


CommandResult.ShowToast(String) Method

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Display a transient desktop-level message to the user. This is especially useful for displaying confirmation that an action took place when the palette will be closed. Consider the CopyTextCommand in the helpers - this command will show a toast with the text "Copied to clipboard", then dismiss the palette.

Creates a new CommandResult instance with its Kind property set to CommandResultKind.ShowToast and its Args set to a new ToastArgs object with its Message set to message.

Parameters

message String

The message to be displayed in the toast. This should be a brief and informative message that conveys the result of the action taken by the user.

Returns

A CommandResult instance.