-api-id | -api-type |
---|---|
M:Windows.UI.Xaml.Controls.WebView.CaptureSelectedContentToDataPackageAsync |
winrt method |
Asynchronously gets a DataPackage that contains the selected content within the WebView.
When this method completes, it returns the selected content as a DataPackage.
You can use this method during a share operation to send the selected WebView content to a target app. This method is asynchronous, so you must use a deferral to prevent your DataRequested event handler from returning before the asynchronous call is complete. Call DataRequestedEventArgs.Request.GetDeferral to create the deferral and DataRequestDeferral.Complete to end it.