Skip to content

Latest commit

 

History

History
47 lines (25 loc) · 2.19 KB

appnotificationbutton_setinvokeuri_1794510296.md

File metadata and controls

47 lines (25 loc) · 2.19 KB
-api-id -api-type
M:Microsoft.Windows.AppNotifications.Builder.AppNotificationButton.SetInvokeUri(Windows.Foundation.Uri,System.String)
winrt method

Microsoft.Windows.AppNotifications.Builder.AppNotificationButton.SetInvokeUri(Windows.Foundation.Uri,System.String)

-description

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

-parameters

-param protocolUri

A Uri object specifying the URI to invoke.

-param targetAppId

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.

-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.

-see-also

-examples