共用方式為


PlayToManager.SourceSelected 事件

定義

發生於已選取 [播放至] 來源專案時。

/// [add: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [remove: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
// Register
event_token SourceSelected(TypedEventHandler<PlayToManager, PlayToSourceSelectedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
PlayToManager::SourceSelected_revoker SourceSelected(auto_revoke_t, TypedEventHandler<PlayToManager, PlayToSourceSelectedEventArgs const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
// Register
event_token SourceSelected(TypedEventHandler<PlayToManager, PlayToSourceSelectedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
PlayToManager::SourceSelected_revoker SourceSelected(auto_revoke_t, TypedEventHandler<PlayToManager, PlayToSourceSelectedEventArgs const&> const& handler) const;
[add: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[remove: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public event TypedEventHandler<PlayToManager,PlayToSourceSelectedEventArgs> SourceSelected;
[add: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<PlayToManager,PlayToSourceSelectedEventArgs> SourceSelected;
function onSourceSelected(eventArgs) { /* Your code */ }
playToManager.addEventListener("sourceselected", onSourceSelected);
playToManager.removeEventListener("sourceselected", onSourceSelected);
- or -
playToManager.onsourceselected = onSourceSelected;
Public Custom Event SourceSelected As TypedEventHandler(Of PlayToManager, PlayToSourceSelectedEventArgs) 

事件類型

屬性

備註

在 [播放到] 啟用的應用程式中,用戶選取 [ 裝置 ] 常用鍵 (或 [播放到 UI]) ,將應用程式的音訊、視訊或影像串流至目標裝置。 在用戶選取目標裝置之後,就會引發SourceSelected事件。 如果使用者離開 [裝置 ] 常用鍵或 [播放到 UI] 而不選取目標裝置,則不會引發 SourceSelected 事件。

適用於

另請參閱