WebView.CaptureSelectedContentToDataPackageAsync Method

Definition

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

public:
 virtual IAsyncOperation<DataPackage ^> ^ CaptureSelectedContentToDataPackageAsync() = CaptureSelectedContentToDataPackageAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DataPackage> CaptureSelectedContentToDataPackageAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DataPackage> CaptureSelectedContentToDataPackageAsync();
function captureSelectedContentToDataPackageAsync()
Public Function CaptureSelectedContentToDataPackageAsync () As IAsyncOperation(Of DataPackage)

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

See also