WebView.CaptureSelectedContentToDataPackageAsync Method

Definition

Asynchronously gets a DataPackage that contains the selected content within the WebView.

C#
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DataPackage> CaptureSelectedContentToDataPackageAsync();

Returns

When this method completes, it returns the selected content as a DataPackage.

Attributes

Remarks

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.

Applies to

Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

See also