Size Changed Event Handler Delegate
public delegate void WindowSizeChangedEventHandler(Platform::Object ^ sender, WindowSizeChangedEventArgs ^ e);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)] /// [Windows.Foundation.Metadata.Guid(1545717570, 11501, 20441, 186, 56, 113, 24, 212, 14, 150, 107)] /// [Windows.Foundation.Metadata.WebHostHidden] class WindowSizeChangedEventHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)] [Windows.Foundation.Metadata.Guid(1545717570, 11501, 20441, 186, 56, 113, 24, 212, 14, 150, 107)] [Windows.Foundation.Metadata.WebHostHidden] public delegate void WindowSizeChangedEventHandler(object sender, WindowSizeChangedEventArgs e);
Public Delegate Sub WindowSizeChangedEventHandler(sender As Object, e As WindowSizeChangedEventArgs)
The object where the handler is attached.
Event data for the event.
Windows 10 requirements
Windows 10 (introduced in 10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced in v1.0)
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 UWP app can offer are controlled by the user and can change at any time.