AppNotificationButton.SetInvokeUri Method

Definition

Overloads

SetInvokeUri(Uri)

Sets the URI that is launched when the app notification button is clicked.

SetInvokeUri(Uri, String)

Sets the URI that is launched when the app notification button is clicked, with a provided Package Family Name (PFN) for disambiguation.

SetInvokeUri(Uri)

Sets the URI that is launched when the app notification button is clicked.

public:
 virtual AppNotificationButton ^ SetInvokeUri(Uri ^ protocolUri) = SetInvokeUri;
/// [Windows.Foundation.Metadata.Overload("SetInvokeUri")]
AppNotificationButton SetInvokeUri(Uri const& protocolUri);
[Windows.Foundation.Metadata.Overload("SetInvokeUri")]
public AppNotificationButton SetInvokeUri(System.Uri protocolUri);
function setInvokeUri(protocolUri)
Public Function SetInvokeUri (protocolUri As Uri) As AppNotificationButton

Parameters

protocolUri
Uri Uri

A Uri object specifying the URI to invoke.

Returns

Returns the AppNotificationButton instance so that additional method calls can be chained.

Attributes

Remarks

You can use the URI to launch a web site in the default browser or to launch an app that has a registered URI scheme. For more information on launching apps with URIs see, Launch an app with a URI.

After calling this method, calling AddArgument on the AppNotificationButton will throw an error. Also, you should set either the invoke URI or the TargetAppId, but not both. If you do set both, the system will use the TargetAppId.

You can also set the invoke URI for an app notification button with the AppNotificationButton.InvokeUri property.

For guidance on using the AppNotificationBuilder APIs to create the UI for app notifications, see App notification content.

For reference information about the XML schema for app notifications, see App notification content schema.

Applies to

SetInvokeUri(Uri, String)

Sets the URI that is launched when the app notification button is clicked, with a provided Package Family Name (PFN) for disambiguation.

public:
 virtual AppNotificationButton ^ SetInvokeUri(Uri ^ protocolUri, Platform::String ^ targetAppId) = SetInvokeUri;
/// [Windows.Foundation.Metadata.Overload("SetInvokeUri2")]
AppNotificationButton SetInvokeUri(Uri const& protocolUri, winrt::hstring const& targetAppId);
[Windows.Foundation.Metadata.Overload("SetInvokeUri2")]
public AppNotificationButton SetInvokeUri(System.Uri protocolUri, string targetAppId);
function setInvokeUri(protocolUri, targetAppId)
Public Function SetInvokeUri (protocolUri As Uri, targetAppId As String) As AppNotificationButton

Parameters

protocolUri
Uri Uri

A Uri object specifying the URI to invoke.

targetAppId
String

Platform::String

winrt::hstring

A string containing the PFN of the target app, to support cases where multiple apps are registered for a single protocol scheme.

Returns

Returns the AppNotificationButton instance so that additional method calls can be chained.

Attributes

Remarks

You can use the URI to launch a web site in the default browser or to launch an app that has a registered URI scheme. For more information on launching apps with URIs see, Launch an app with a URI.

After calling this method, calling AddArgument on the AppNotificationButton will throw an error. Also, you should set either the invoke URI or the TargetAppId, but not both. If you do set both, the system will use the TargetAppId.

You can also set the invoke URI for an app notification button with the AppNotificationButton.InvokeUri property.

For guidance on using the AppNotificationBuilder APIs to create the UI for app notifications, see App notification content.

For reference information about the XML schema for app notifications, see App notification content schema.

Applies to