WebView.CaptureSelectedContentToDataPackageAsync Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
When this method completes, it returns the selected content as a DataPackage.
- Attributes
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.
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 |