Window.VisibilityChanged 事件

定义

Visible 属性的值更改时发生。

// 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) 

事件类型

注解

VisibilityChangedEventArgs 包含一个布尔Visible属性,应检查该属性来确定当前可见性状态。

适用于

另请参阅