WebView.CaptureSelectedContentToDataPackageAsync WebView.CaptureSelectedContentToDataPackageAsync WebView.CaptureSelectedContentToDataPackageAsync WebView.CaptureSelectedContentToDataPackageAsync Method

Definition

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

public : IAsyncOperation<DataPackage> CaptureSelectedContentToDataPackageAsync()
IAsyncOperation<DataPackage> CaptureSelectedContentToDataPackageAsync() const;
public IAsyncOperation<DataPackage> CaptureSelectedContentToDataPackageAsync()
Public Function CaptureSelectedContentToDataPackageAsync() As IAsyncOperation(Of DataPackage)
Returns

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

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.

See Also