共用方式為


DataTransferManager.ShareProvidersRequested 事件

定義

要求共用提供者時所觸發的事件。 這會用來作為回呼,而且會在事件處理常式中訂閱此事件並呼叫 ShareProvidersRequestedEventArgs.Providers.Add () 來新增。

// Register
event_token ShareProvidersRequested(TypedEventHandler<DataTransferManager, ShareProvidersRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
DataTransferManager::ShareProvidersRequested_revoker ShareProvidersRequested(auto_revoke_t, TypedEventHandler<DataTransferManager, ShareProvidersRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<DataTransferManager,ShareProvidersRequestedEventArgs> ShareProvidersRequested;
function onShareProvidersRequested(eventArgs) { /* Your code */ }
dataTransferManager.addEventListener("shareprovidersrequested", onShareProvidersRequested);
dataTransferManager.removeEventListener("shareprovidersrequested", onShareProvidersRequested);
- or -
dataTransferManager.onshareprovidersrequested = onShareProvidersRequested;
Public Custom Event ShareProvidersRequested As TypedEventHandler(Of DataTransferManager, ShareProvidersRequestedEventArgs) 

事件類型

Windows 需求

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

適用於