Parameters

Return value

Remarks

The GetDeferral method allows your app to call a function during a share operation, so that your app can asynchronously generate the DataPackage object for the target app.

Use this method when you want to use an asynchronous function call to generate the DataPackage during a share operation. This function must return a DataPackage object within 200ms to prevent the operation from timing out. If your app shares content that takes more time to package, such as a collection of files or photos, don't use this method. Instead, use the SetDataProvider method to assign a delegate to a DataPackage and return that DataPackage to the target app.

Examples

The following sample shows how to get a DataRequestDeferral object by using the GetDeferral method.