WindowSizeChangedEventArgs WindowSizeChangedEventArgs WindowSizeChangedEventArgs WindowSizeChangedEventArgs Class


Contains the argument returned by a window size change event.

public : sealed class WindowSizeChangedEventArgs : ICoreWindowEventArgs
struct winrt::Windows::UI::Core::WindowSizeChangedEventArgs : ICoreWindowEventArgs
public sealed class WindowSizeChangedEventArgs : ICoreWindowEventArgs
Public NotInheritable Class WindowSizeChangedEventArgs Implements ICoreWindowEventArgs

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


void SetWindow(CoreWindow const & window)
    window.SizeChanged({ this, &App::OnWindowSizeChanged });

// Size changed data in WindowSizeChangedEventArgs.
void OnWindowSizeChanged(Windows::UI::Core::CoreWindow const& /* sender */, Windows::UI::Core::WindowSizeChangedEventArgs const& /* args */) {}
// returning window size change events data through WindowSizeChangedEventArgs
void MyCoreWindowEvents::SetWindow( // implementation called by CoreApplication::Run(), provided for context
    _In_ CoreWindow^ window
    // ...
    window->SizeChanged +=
        ref new TypedEventHandler<CoreWindow^, WindowSizeChangedEventArgs^>(this, &CoreWindowEvents::OnWindowSizeChanged)
    // ...


This object is returned by a delegate registered for the CoreWindow.SizeChanged event.


: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX).


Handled Handled Handled Handled

Gets or sets whether the window size event was handled.

Size Size Size Size

Gets the new size of the window in units of effective (view) pixels.