CameraOcclusionInfo.StateChanged 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当相机设备的遮挡状态更改时引发。
// 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 属性,获取相机的更新遮挡状态。