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) 

事件类型

注解

通过访问传递到事件处理程序的 CameraOcclusionStateChangedEventArgsState 属性,获取相机的更新遮挡状态。

适用于

另请参阅