< Back
New-BTInput
Post
NAME New-BTInput
SYNOPSIS
Creates an input element on a Toast notification.
SYNTAX
New-BTInput -Id <String> [-Title <String>] [-PlaceholderContent <String>] [-DefaultInput <String>] [-WhatIf]
[-Confirm] [<CommonParameters>]
New-BTInput -Id <String> [-Title <String>] [-DefaultSelectionBoxItemId <String>] -Items <ToastSelectionBoxItem[]>
[-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
The New-BTInput function creates an input element on a Toast notification.
Returned object is either a TextBox for users to type text into or SelectionBox to users to select from a list of
options.
PARAMETERS
-Id <String>
Used so that developers can retrieve user input once the app is activated.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Title <String>
Title text to display above the element.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PlaceholderContent <String>
Placeholder text to be displayed on the text box when the user hasn't typed any text yet.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DefaultInput <String>
The initial text to place in the text box. Leave this null for a blank text box.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DefaultSelectionBoxItemId <String>
This controls which item is selected by default, and refers to the Id property of a Selection Box Item
(New-BTSelectionBoxItem.)
If you do not provide this, the default selection will be empty (user sees nothing).
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Items <ToastSelectionBoxItem[]>
The selection items that the user can pick from in this SelectionBox. Only 5 items can be added.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept 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).
INPUTS
None
OUTPUTS
ToastTextBox
ToastSelectionBox
NOTES
Credit for most of the help text for this function go to the authors of the UWPCommunityToolkit library that
this module relies upon.
Please see the originating repo here: https://github.com/Microsoft/UWPCommunityToolkit
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>New-BTInput -Id Reply001 -Title 'Type a reply:'
This command creates a new text box for a user to type a reply. (n.b. this sort of functionality probably won't
work through BurntToast as PowerShell cannot, currently, subscribe to WinRT events.)
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>New-BTInput -Id 'Selection001' -DefaultSelectionBoxItemId 'Item5' -Items $Select1, $Select2, $Select3,
$Select4, $Select5
This command creates a new selection box containing five options and specifying the ID of one of the options as
the default.
RELATED LINKS
https://github.com/Windos/BurntToast/bl ... BTInput.md
SYNOPSIS
Creates an input element on a Toast notification.
SYNTAX
New-BTInput -Id <String> [-Title <String>] [-PlaceholderContent <String>] [-DefaultInput <String>] [-WhatIf]
[-Confirm] [<CommonParameters>]
New-BTInput -Id <String> [-Title <String>] [-DefaultSelectionBoxItemId <String>] -Items <ToastSelectionBoxItem[]>
[-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
The New-BTInput function creates an input element on a Toast notification.
Returned object is either a TextBox for users to type text into or SelectionBox to users to select from a list of
options.
PARAMETERS
-Id <String>
Used so that developers can retrieve user input once the app is activated.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Title <String>
Title text to display above the element.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PlaceholderContent <String>
Placeholder text to be displayed on the text box when the user hasn't typed any text yet.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DefaultInput <String>
The initial text to place in the text box. Leave this null for a blank text box.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DefaultSelectionBoxItemId <String>
This controls which item is selected by default, and refers to the Id property of a Selection Box Item
(New-BTSelectionBoxItem.)
If you do not provide this, the default selection will be empty (user sees nothing).
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Items <ToastSelectionBoxItem[]>
The selection items that the user can pick from in this SelectionBox. Only 5 items can be added.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept 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).
INPUTS
None
OUTPUTS
ToastTextBox
ToastSelectionBox
NOTES
Credit for most of the help text for this function go to the authors of the UWPCommunityToolkit library that
this module relies upon.
Please see the originating repo here: https://github.com/Microsoft/UWPCommunityToolkit
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>New-BTInput -Id Reply001 -Title 'Type a reply:'
This command creates a new text box for a user to type a reply. (n.b. this sort of functionality probably won't
work through BurntToast as PowerShell cannot, currently, subscribe to WinRT events.)
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>New-BTInput -Id 'Selection001' -DefaultSelectionBoxItemId 'Item5' -Items $Select1, $Select2, $Select3,
$Select4, $Select5
This command creates a new selection box containing five options and specifying the ID of one of the options as
the default.
RELATED LINKS
https://github.com/Windos/BurntToast/bl ... BTInput.md