共用方式為


CameraOcclusionInfo.StateChanged 事件

定義

當相機裝置的遮蔽狀態變更時引發。

// Register
event_token StateChanged(TypedEventHandler<CameraOcclusionInfo, CameraOcclusionStateChangedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
CameraOcclusionInfo::StateChanged_revoker StateChanged(auto_revoke_t, TypedEventHandler<CameraOcclusionInfo, CameraOcclusionStateChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<CameraOcclusionInfo,CameraOcclusionStateChangedEventArgs> StateChanged;
function onStateChanged(eventArgs) { /* Your code */ }
cameraOcclusionInfo.addEventListener("statechanged", onStateChanged);
cameraOcclusionInfo.removeEventListener("statechanged", onStateChanged);
- or -
cameraOcclusionInfo.onstatechanged = onStateChanged;
Public Custom Event StateChanged As TypedEventHandler(Of CameraOcclusionInfo, CameraOcclusionStateChangedEventArgs) 

事件類型

備註

藉由存取傳遞至事件處理常式的CameraOcclusionStateChangedEventArgs的 State屬性,以取得相機的更新遮蔽狀態。

適用於

另請參閱