Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Window.VisibilityChanged Event

Definition

Namespace:
Microsoft.UI.Xaml

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Occurs when the value of the Visible property changes.

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

Event Type

Remarks

VisibilityChangedEventArgs includes a Boolean Visible property that you should check to determine the current visibility state.

Applies to

See also


Feedback

Was this page helpful?