Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WindowSizeChangedEventHandler delegate

Applies to Windows and Windows Phone

Represents the method that will handle the Window.SizeChanged event.

Syntax


public delegate void WindowSizeChangedEventHandler(
  object sender, 
  WindowSizeChangedEventArgs e
)

Attributes

[Version(0x06020000)]
[WebHostHidden()]

Parameters

sender

Type: System.Object [.NET] | Platform::Object [C++]

The object where the handler is attached.

e

Type: WindowSizeChangedEventArgs

Event data for the event.

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

ApplicationView
Window
FrameworkElement.SizeChanged
Quickstart: Designing apps for different window sizes

 

 

Show:
© 2014 Microsoft