| title | CommandResult.ShowToast(String) Method | |||
|---|---|---|---|---|
| description | The ShowToast method displays a transient desktop-level message to the user, accepting a string message. | |||
| ms.date | 2/11/2025 | |||
| ms.topic | reference | |||
| no-loc |
|
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.
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.
A CommandResult instance.