ToastContentBuilder.AddButton Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddButton(IToastButton) |
Add a button to the current toast. |
AddButton(String, ToastActivationType, String) |
Add a button to the current toast. |
AddButton(String, ToastActivationType, String, Uri) |
Add a button to the current toast. |
AddButton(String, String, ToastActivationType, String) |
Add an button to the toast that will be display to the right of the input text box, achieving a quick reply scenario. |
AddButton(String, String, ToastActivationType, String, Uri) |
Add an button to the toast that will be display to the right of the input text box, achieving a quick reply scenario. |
AddButton(IToastButton)
Add a button to the current toast.
public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder AddButton (Microsoft.Toolkit.Uwp.Notifications.IToastButton button);
member this.AddButton : Microsoft.Toolkit.Uwp.Notifications.IToastButton -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function AddButton (button As IToastButton) As ToastContentBuilder
Parameters
- button
- IToastButton
An instance of class that implement IToastButton for the button that will be used on the toast.
Returns
The current instance of ToastContentBuilder
Applies to
AddButton(String, ToastActivationType, String)
Add a button to the current toast.
public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder AddButton (string content, Microsoft.Toolkit.Uwp.Notifications.ToastActivationType activationType, string arguments);
member this.AddButton : string * Microsoft.Toolkit.Uwp.Notifications.ToastActivationType * string -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function AddButton (content As String, activationType As ToastActivationType, arguments As String) As ToastContentBuilder
Parameters
- content
- String
Text to display on the button.
- activationType
- ToastActivationType
Type of activation this button will use when clicked. Defaults to Foreground.
- arguments
- String
App-defined string of arguments that the app can later retrieve once it is activated when the user clicks the button.
Returns
The current instance of ToastContentBuilder
Applies to
AddButton(String, ToastActivationType, String, Uri)
Add a button to the current toast.
public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder AddButton (string content, Microsoft.Toolkit.Uwp.Notifications.ToastActivationType activationType, string arguments, Uri imageUri = default);
public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder AddButton (string content, Microsoft.Toolkit.Uwp.Notifications.ToastActivationType activationType, string arguments, Uri imageUri);
member this.AddButton : string * Microsoft.Toolkit.Uwp.Notifications.ToastActivationType * string * Uri -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function AddButton (content As String, activationType As ToastActivationType, arguments As String, Optional imageUri As Uri = Nothing) As ToastContentBuilder
Public Function AddButton (content As String, activationType As ToastActivationType, arguments As String, imageUri As Uri) As ToastContentBuilder
Parameters
- content
- String
Text to display on the button.
- activationType
- ToastActivationType
Type of activation this button will use when clicked. Defaults to Foreground.
- arguments
- String
App-defined string of arguments that the app can later retrieve once it is activated when the user clicks the button.
- imageUri
- Uri
Optional image icon for the button to display (required for buttons adjacent to inputs like quick reply).
Returns
The current instance of ToastContentBuilder
Applies to
AddButton(String, String, ToastActivationType, String)
Add an button to the toast that will be display to the right of the input text box, achieving a quick reply scenario.
public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder AddButton (string textBoxId, string content, Microsoft.Toolkit.Uwp.Notifications.ToastActivationType activationType, string arguments);
member this.AddButton : string * string * Microsoft.Toolkit.Uwp.Notifications.ToastActivationType * string -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function AddButton (textBoxId As String, content As String, activationType As ToastActivationType, arguments As String) As ToastContentBuilder
Parameters
- textBoxId
- String
ID of an existing ToastTextBox in order to have this button display to the right of the input, achieving a quick reply scenario.
- content
- String
Text to display on the button.
- activationType
- ToastActivationType
Type of activation this button will use when clicked. Defaults to Foreground.
- arguments
- String
App-defined string of arguments that the app can later retrieve once it is activated when the user clicks the button.
Returns
The current instance of ToastContentBuilder
Applies to
AddButton(String, String, ToastActivationType, String, Uri)
Add an button to the toast that will be display to the right of the input text box, achieving a quick reply scenario.
public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder AddButton (string textBoxId, string content, Microsoft.Toolkit.Uwp.Notifications.ToastActivationType activationType, string arguments, Uri imageUri = default);
public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder AddButton (string textBoxId, string content, Microsoft.Toolkit.Uwp.Notifications.ToastActivationType activationType, string arguments, Uri imageUri);
member this.AddButton : string * string * Microsoft.Toolkit.Uwp.Notifications.ToastActivationType * string * Uri -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function AddButton (textBoxId As String, content As String, activationType As ToastActivationType, arguments As String, Optional imageUri As Uri = Nothing) As ToastContentBuilder
Public Function AddButton (textBoxId As String, content As String, activationType As ToastActivationType, arguments As String, imageUri As Uri) As ToastContentBuilder
Parameters
- textBoxId
- String
ID of an existing ToastTextBox in order to have this button display to the right of the input, achieving a quick reply scenario.
- content
- String
Text to display on the button.
- activationType
- ToastActivationType
Type of activation this button will use when clicked. Defaults to Foreground.
- arguments
- String
App-defined string of arguments that the app can later retrieve once it is activated when the user clicks the button.
- imageUri
- Uri
An optional image icon for the button to display (required for buttons adjacent to inputs like quick reply)
Returns
The current instance of ToastContentBuilder