CoreWindow.SizeChanged Event
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 window size is changed.
// Register
event_token SizeChanged(TypedEventHandler<CoreWindow, WindowSizeChangedEventArgs const&> const& handler) const;
// Revoke with event_token
void SizeChanged(event_token const* cookie) const;
// Revoke with event_revoker
CoreWindow::SizeChanged_revoker SizeChanged(auto_revoke_t, TypedEventHandler<CoreWindow, WindowSizeChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<CoreWindow,WindowSizeChangedEventArgs> SizeChanged;
function onSizeChanged(eventArgs) { /* Your code */ }
coreWindow.addEventListener("sizechanged", onSizeChanged);
coreWindow.removeEventListener("sizechanged", onSizeChanged);
- or -
coreWindow.onsizechanged = onSizeChanged;
Public Custom Event SizeChanged As TypedEventHandler(Of CoreWindow, WindowSizeChangedEventArgs) Implements SizeChanged
The SizeChanged event is exposed to XAML apps as the Window.SizeChanged event and to HTML apps as the window.resize event.
This event occurs when the window size changes or when one of the following properties changes:
- ApplicationView.AdjacentToLeftDisplayEdge
- ApplicationView.AdjacentToRightDisplayEdge
- ApplicationView.IsFullScreen
- ApplicationView.IsFullScreenMode
- UIViewSettings.UserInteractionMode
You can use this event to listen for changes to the size or position of the current window.