ShareOperation.ReportCompleted Method

Definition

Overloads

ReportCompleted()

Specifies that the sharing operation is complete.

ReportCompleted(QuickLink)

Specifies that the sharing operation is complete. A QuickLink that the system can save as a shortcut for future sharing operations is included.

ReportCompleted()

Specifies that the sharing operation is complete.

public:
 virtual void ReportCompleted() = ReportCompleted;
/// [Windows.Foundation.Metadata.Overload("ReportCompleted")]
void ReportCompleted();
[Windows.Foundation.Metadata.Overload("ReportCompleted")]
public void ReportCompleted();
function reportCompleted()
Public Sub ReportCompleted ()
Attributes

Examples

The following example shows how a target app might respond to a share operation. Notice the use of reportComplete when the target app has finished processing the data.

if (eventArgs.kind === Windows.ApplicationModel.Activation.ActivationKind.shareTarget) {
    shareOperation = eventArgs.shareOperation;
    if (shareOperation.data.contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.text)) {
        var output = document.createElement("div");
        var shareData = shareOperation.data.getText();
        output.innerText = shareData;
        document.body.appendChild(output);
        shareOperation.reportCompleted();
    }
}

Remarks

When your app acts as a target for a share operation, it should call reportComplete after it has processed the data being shared. This method closes the app window and returns the user to the source app.

See also

Applies to

ReportCompleted(QuickLink)

Specifies that the sharing operation is complete. A QuickLink that the system can save as a shortcut for future sharing operations is included.

public:
 virtual void ReportCompleted(QuickLink ^ quicklink) = ReportCompleted;
/// [Windows.Foundation.Metadata.Overload("ReportCompletedWithQuickLink")]
void ReportCompleted(QuickLink const& quicklink);
[Windows.Foundation.Metadata.Overload("ReportCompletedWithQuickLink")]
public void ReportCompleted(QuickLink quicklink);
function reportCompleted(quicklink)
Public Sub ReportCompleted (quicklink As QuickLink)

Parameters

quicklink
QuickLink

A QuickLink object that the system saves as a shortcut for future sharing operations.

Attributes

See also

Applies to