CaptureSelectedContentToDataPackageAsync method
TOC
Collapse the table of content
Expand the table of content

WebView.CaptureSelectedContentToDataPackageAsync method

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

Syntax


public IAsyncOperation<DataPackage> CaptureSelectedContentToDataPackageAsync()

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<DataPackage>

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.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

WebView
DataPackage
WebView control (XAML) sample (Windows 10)

 

 

Show:
© 2016 Microsoft