For the complete documentation index, see llms.txt. This page is also available as Markdown.

Show-UDToast

Displays a toast message to the user.

Synopsis

Displays a toast message to the user.

Syntax

Show-UDToast [-Message] <String> [-MessageColor <DashboardColor>] [-MessageSize <String>] [-Duration <Int32>] [-Title <String>] [-TitleColor <DashboardColor>] [-TitleSize <String>] [-Id <String>] [-BackgroundColor <DashboardColor>] [-Theme <String>] [-Icon <Object>] [-IconColor <DashboardColor>] [-Position <String>] [-HideCloseButton] [-CloseOnClick] [-CloseOnEscape] [-ReplaceToast] [-RightToLeft] [-Balloon] [-Overlay] [-OverlayClose] [-OverlayColor <DashboardColor>] [-TransitionIn <String>] [-TransitionOut <String>] [-Broadcast] [-Persistent] [<CommonParameters>]

Description

Displays a toast message to the user.

Parameters

-Message

The message to display.

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

-MessageColor

The text color of the message.

-MessageSize

The size of the message.

-Duration

The duration in milleseconds before the message disappears.

-Title

The title to display.

-TitleColor

The text color of the title.

-TitleSize

The size of the title.

-Id

The ID of the toast. For use with Hide-UDToast.

-BackgroundColor

The background color of the toast.

-Theme

Light or dark theme.

-Icon The icon to display in the toast.Required? falsePosition? namedDefault valueAccept pipeline input? falseAliasesAccept wildcard characters? false-IconColorThe color of the icon.Required? falsePosition? namedDefault valueAccept pipeline input? falseAliasesAccept wildcard characters? false-PositionWhere to display the toast.Required? falsePosition? namedDefault value topRightAccept pipeline input? falseAliasesAccept wildcard characters? false -HideCloseButton [<SwitchParameter>] Hides the close button.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false -CloseOnClick [<SwitchParameter>] Closes the toast when clicked.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false -CloseOnEscape [<SwitchParameter>] Closes the toast when esc is pressed.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false -ReplaceToast [<SwitchParameter>] Replaces an existing toast if one is already showing.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false -RightToLeft [<SwitchParameter>] Right to left text.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false -Balloon [<SwitchParameter>] Creates a balloon toast.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false -Overlay [<SwitchParameter>] Displays an overlay behind the toast.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false -OverlayClose [<SwitchParameter>] Allow the user to close the overlay.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false-OverlayColorThe color of the overlay.Required? falsePosition? namedDefault valueAccept pipeline input? falseAliasesAccept wildcard characters? false-TransitionInThe transition in effect.Required? falsePosition? namedDefault value fadeInUpAccept pipeline input? falseAliasesAccept wildcard characters? false-TransitionOutThe transition out effect.Required? falsePosition? namedDefault value fadeOutAccept pipeline input? falseAliasesAccept wildcard characters? false -Broadcast [<SwitchParameter>] Broadcasts the toast to all connected users.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false -Persistent [<SwitchParameter>] Prevents the toast from closing due to the duration.Required? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false <CommonParameters> This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).Outputs-------------------------- EXAMPLE 1 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!'PS > } -Id 'toast1'Basic Toast Shows a toast message.-------------------------- EXAMPLE 2 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -Duration 5000PS > } -Id 'toast2'Duration|Shows a toast message with a longer duration.-------------------------- EXAMPLE 3 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -Title 'Toast Title'PS > } -Id 'toast3'Title|Shows a toast message with a title.-------------------------- EXAMPLE 4 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -Title 'Toast Title' -TitleColor 'red'PS > } -Id 'toast4'Title Color|Shows a toast message with a title and a red title color.-------------------------- EXAMPLE 5 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -Title 'Toast Title' -TitleColor 'red' -TitleSize 'large'PS > } -Id 'toast5'Title Size|Shows a toast message with a title, a red title color, and a large title size.-------------------------- EXAMPLE 6 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -MessageColor 'blue'PS > } -Id 'toast6'Message Color|Shows a toast message with a blue message color.-------------------------- EXAMPLE 7 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -MessageSize 'large'PS > } -Id 'toast7'Message Size|Shows a toast message with a large message size.-------------------------- EXAMPLE 8 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -Icon 'check'PS > } -Id 'toast8'Icon|Shows a toast message with a check icon.-------------------------- EXAMPLE 9 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -Persistent -Id 'MyToast'PS > } -Id 'toast9'PS > New-UDButton -Text 'Hide Toast' -OnClick {PS > Hide-UDToast -Id 'MyToast'PS > } -Id 'toast10'Persistent|Shows a toast message that will not close. The Hide-UDToast command can be used to close the toast.-------------------------- EXAMPLE 10 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -Position 'bottomRight'PS > } -Id 'toast11'Position|Shows a toast message at the bottom right of the screen.-------------------------- EXAMPLE 11 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -HideCloseButtonPS > } -Id 'toast12'Hide Close Button|Shows a toast message without a close button.-------------------------- EXAMPLE 12 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -CloseOnClickPS > } -Id 'toast13'Close On Click|Shows a toast message that will close when clicked.-------------------------- EXAMPLE 13 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -CloseOnEscapePS > } -Id 'toast14'Close On Escape|Shows a toast message that will close when the escape key is pressed.-------------------------- EXAMPLE 14 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -ReplaceToast -Id "toastId"PS > } -Id 'toast15'Replace Toast|Shows a toast message that will replace an existing toast. -Id is required.-------------------------- EXAMPLE 15 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -RightToLeftPS > } -Id 'toast16'Right To Left|Shows a toast message with right to left text.-------------------------- EXAMPLE 16 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -BalloonPS > } -Id 'toast17'Balloon|Shows a toast message as a balloon.-------------------------- EXAMPLE 17 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -OverlayPS > } -Id 'toast18'Overlay|Shows a toast message as an overlay.-------------------------- EXAMPLE 18 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -Theme 'dark'PS > } -Id 'toast19'Theme|Shows a toast message with a dark theme.-------------------------- EXAMPLE 19 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -BackgroundColor 'red'PS > } -Id 'toast20'Background Color|Shows a toast message with a red background color.-------------------------- EXAMPLE 20 --------------------------PS >New-UDButton -Text 'Show Toast' -OnClick {PS > Show-UDToast -Message 'Hello, World!' -TransitionIn 'bounceInLeft' -TransitionOut 'bounceInRight'PS > } -Id 'toast21'Transition|Shows a toast message with a bounce in left transition and a bounce out right transition.

Last updated

Was this helpful?