共用方式為


DataPackage.ShareCompleted 事件

定義

共用完成時所觸發的事件。 共用可以傳送至應用程式、提供者或連絡人。

// 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) 

事件類型

Windows 需求

裝置系列
Windows 10 Creators Update (已於 10.0.15063.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v4.0 引進)

備註

注意

選取 [複製連結] 不會被視為 共用 ,因此不會引發此事件,也不會引發 ShareCanceled

適用於