PlayToConnection.StateChanged 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当“播放到”连接的状态发生更改时发生。
/// [add: Windows.Foundation.Metadata.Deprecated("PlayToConnection may be altered or unavailable for releases after Windows 10. Instead, use CastingConnection.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [remove: Windows.Foundation.Metadata.Deprecated("PlayToConnection may be altered or unavailable for releases after Windows 10. Instead, use CastingConnection.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
// Register
event_token StateChanged(TypedEventHandler<PlayToConnection, PlayToConnectionStateChangedEventArgs const&> const& handler) const;
// Revoke with event_token
void StateChanged(event_token const* cookie) const;
// Revoke with event_revoker
PlayToConnection::StateChanged_revoker StateChanged(auto_revoke_t, TypedEventHandler<PlayToConnection, PlayToConnectionStateChangedEventArgs const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("PlayToConnection may be altered or unavailable for releases after Windows 10. Instead, use CastingConnection.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("PlayToConnection may be altered or unavailable for releases after Windows 10. Instead, use CastingConnection.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
// Register
event_token StateChanged(TypedEventHandler<PlayToConnection, PlayToConnectionStateChangedEventArgs const&> const& handler) const;
// Revoke with event_token
void StateChanged(event_token const* cookie) const;
// Revoke with event_revoker
PlayToConnection::StateChanged_revoker StateChanged(auto_revoke_t, TypedEventHandler<PlayToConnection, PlayToConnectionStateChangedEventArgs const&> const& handler) const;
[add: Windows.Foundation.Metadata.Deprecated("PlayToConnection may be altered or unavailable for releases after Windows 10. Instead, use CastingConnection.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[remove: Windows.Foundation.Metadata.Deprecated("PlayToConnection may be altered or unavailable for releases after Windows 10. Instead, use CastingConnection.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public event TypedEventHandler<PlayToConnection,PlayToConnectionStateChangedEventArgs> StateChanged;
[add: Windows.Foundation.Metadata.Deprecated("PlayToConnection may be altered or unavailable for releases after Windows 10. Instead, use CastingConnection.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("PlayToConnection may be altered or unavailable for releases after Windows 10. Instead, use CastingConnection.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<PlayToConnection,PlayToConnectionStateChangedEventArgs> StateChanged;
function onStateChanged(eventArgs) { /* Your code */ }
playToConnection.addEventListener("statechanged", onStateChanged);
playToConnection.removeEventListener("statechanged", onStateChanged);
- or -
playToConnection.onstatechanged = onStateChanged;
Public Custom Event StateChanged As TypedEventHandler(Of PlayToConnection, PlayToConnectionStateChangedEventArgs)
事件类型
- 属性