WindowSizeChangedEventHandler
WindowSizeChangedEventHandler
WindowSizeChangedEventHandler
WindowSizeChangedEventHandler
Delegate
Definition
Represents the method that will handle the Window.SizeChanged event.
public : delegate void WindowSizeChangedEventHandler(PlatForm::Object sender, WindowSizeChangedEventArgs e)public delegate void WindowSizeChangedEventHandler(Object sender, WindowSizeChangedEventArgs e)Public Delegate WindowSizeChangedEventHandler(sender As Object, e As WindowSizeChangedEventArgs)// This API is not available in Javascript.
- sender
- PlatForm::Object Object Object Object
The object where the handler is attached.
- e
- WindowSizeChangedEventArgs WindowSizeChangedEventArgs WindowSizeChangedEventArgs WindowSizeChangedEventArgs
Event data for the event.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
The SizeChanged event fires when the Window size changes. There are multiple reasons why the Window size of an app might change. These reasons include changes to device orientation that result in a redraw of the current app UI, or the user resizes the app. By handling the SizeChanged event, an app can determine what the current app view is in order to modify their UI. This gives your app code a chance to assure that the elements are presented correctly for the new window size and shape. If the view state is changing to a narrow width, this often means that you are making choices about which UI elements should remain displayed and which should be hidden until the app is restored to a wider view. SizeChanged is an important event to handle because the multiple views that your Windows Store app can offer are controlled by the user and can change at any time.