Delen via


DataRequestDeferral.Complete Method

Definition

Indicates that the content for an asynchronous share is ready for a target app, or that an error in the sharing operation occurred.

public:
 virtual void Complete() = Complete;
void Complete();
public void Complete();
function complete()
Public Sub Complete ()

Examples

This example shows how to call the complete method after getting a DataRequestDeferral object.

void DataRequested(DataTransferManager sender, DataRequestedEventArgs e)
{
    DataRequestDeferral deferral = e.Request.GetDeferral();
    e.Request.Data.Properties.Title = "Hello World!";
    e.Request.Data.Properties.Description = "This example shows how to share files and images.";
    if (this.dataPackageThumbnail != null)
    {
        e.Request.Data.Properties.Thumbnail = this.dataPackageThumbnail;
    }
    e.Request.Data.SetBitmap(imageStreamRef);
    deferral.Complete();
}

Remarks

Your app must call the complete method when its finished adding data to a DataPackage.

Applies to