Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 1.46 KB

windowsizechangedeventargs.md

File metadata and controls

49 lines (38 loc) · 1.46 KB
-api-id -api-type
T:Windows.UI.Core.WindowSizeChangedEventArgs
winrt class

Windows.UI.Core.WindowSizeChangedEventArgs

-description

Contains the argument returned by a window size change event.

-remarks

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

Note

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).

-examples

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)
    // ...
}

-see-also