Window.VisibilityChanged 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
// Register
event_token VisibilityChanged(TypedEventHandler<IInspectable, WindowVisibilityChangedEventArgs const&> const& handler) const;
// Revoke with event_token
void VisibilityChanged(event_token const* cookie) const;
// Revoke with event_revoker
Window::VisibilityChanged_revoker VisibilityChanged(auto_revoke_t, TypedEventHandler<IInspectable, WindowVisibilityChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<object,WindowVisibilityChangedEventArgs> VisibilityChanged;
function onVisibilityChanged(eventArgs) { /* Your code */ }
window.addEventListener("visibilitychanged", onVisibilityChanged);
window.removeEventListener("visibilitychanged", onVisibilityChanged);
- or -
window.onvisibilitychanged = onVisibilityChanged;
Public Custom Event VisibilityChanged As TypedEventHandler(Of Object, WindowVisibilityChangedEventArgs)
事件类型
TypedEventHandler<IInspectable,WindowVisibilityChangedEventArgs>
注解
VisibilityChangedEventArgs 包含一个布尔Visible
属性,应检查该属性来确定当前可见性状态。