ToastContentBuilder.SetProtocolActivation 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
SetProtocolActivation(Uri) |
Configures the toast notification to launch the specified url when the toast body is clicked. |
SetProtocolActivation(Uri, String) |
Configures the toast notification to launch the specified url when the toast body is clicked. |
SetProtocolActivation(Uri)
Configures the toast notification to launch the specified url when the toast body is clicked.
public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder SetProtocolActivation (Uri protocol);
abstract member SetProtocolActivation : Uri -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
override this.SetProtocolActivation : Uri -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function SetProtocolActivation (protocol As Uri) As ToastContentBuilder
Parameters
- protocol
- Uri
The protocol to launch.
Returns
The current instance of ToastContentBuilder
Applies to
SetProtocolActivation(Uri, String)
Configures the toast notification to launch the specified url when the toast body is clicked.
public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder SetProtocolActivation (Uri protocol, string targetApplicationPfn);
abstract member SetProtocolActivation : Uri * string -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
override this.SetProtocolActivation : Uri * string -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function SetProtocolActivation (protocol As Uri, targetApplicationPfn As String) As ToastContentBuilder
Parameters
- protocol
- Uri
The protocol to launch.
- targetApplicationPfn
- String
New in Creators Update: The target PFN, so that regardless of whether multiple apps are registered to handle the same protocol uri, your desired app will always be launched.
Returns
The current instance of ToastContentBuilder