Share via


CoreApplicationViewTitleBar.LayoutMetricsChanged Event

Definition

Occurs when the title bar needs to respond to size changes. The most common trigger for this event is when the app window moves to a screen that has a different DPI. Use this event to verify and update the positioning of UI elements that depend on the title bar's size.

// Register
event_token LayoutMetricsChanged(TypedEventHandler<CoreApplicationViewTitleBar, IInspectable const&> const& handler) const;

// Revoke with event_token
void LayoutMetricsChanged(event_token const* cookie) const;

// Revoke with event_revoker
CoreApplicationViewTitleBar::LayoutMetricsChanged_revoker LayoutMetricsChanged(auto_revoke_t, TypedEventHandler<CoreApplicationViewTitleBar, IInspectable const&> const& handler) const;
public event TypedEventHandler<CoreApplicationViewTitleBar,object> LayoutMetricsChanged;
function onLayoutMetricsChanged(eventArgs) { /* Your code */ }
coreApplicationViewTitleBar.addEventListener("layoutmetricschanged", onLayoutMetricsChanged);
coreApplicationViewTitleBar.removeEventListener("layoutmetricschanged", onLayoutMetricsChanged);
- or -
coreApplicationViewTitleBar.onlayoutmetricschanged = onLayoutMetricsChanged;
Public Custom Event LayoutMetricsChanged As TypedEventHandler(Of CoreApplicationViewTitleBar, Object) 

Event Type

Applies to