Delen via


DataPackage.ShareCompleted Event

Definition

An event that is triggered when a share is completed. Shares can be sent to an app, a provider, or a contact.

// Register
event_token ShareCompleted(TypedEventHandler<DataPackage, ShareCompletedEventArgs const&> const& handler) const;

// Revoke with event_token
void ShareCompleted(event_token const* cookie) const;

// Revoke with event_revoker
DataPackage::ShareCompleted_revoker ShareCompleted(auto_revoke_t, TypedEventHandler<DataPackage, ShareCompletedEventArgs const&> const& handler) const;
public event TypedEventHandler<DataPackage,ShareCompletedEventArgs> ShareCompleted;
function onShareCompleted(eventArgs) { /* Your code */ }
dataPackage.addEventListener("sharecompleted", onShareCompleted);
dataPackage.removeEventListener("sharecompleted", onShareCompleted);
- or -
dataPackage.onsharecompleted = onShareCompleted;
Public Custom Event ShareCompleted As TypedEventHandler(Of DataPackage, ShareCompletedEventArgs) 

Event Type

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

Note

Selecting "Copy link" is not considered a share and thus does not fire this event, nor ShareCanceled.

Applies to