WindowSizeChangedEventArgs WindowSizeChangedEventArgs WindowSizeChangedEventArgs Class

Contains the argument returned by a window size change event.

Syntax

Declaration

public sealed class WindowSizeChangedEventArgspublic sealed class WindowSizeChangedEventArgsPublic NotInheritable Class WindowSizeChangedEventArgs

Remarks

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


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

    // ...

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

Properties summary

Gets or sets whether the window size event was handled.

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

Properties

  • Handled
    Handled
    Handled
    Handled

    Gets or sets whether the window size event was handled.

    public bool Handled { get; set; }public bool Handled { get; set; }Public ReadWrite Property Handled As boolpublic bool Handled { get; set; }

    Property Value

    • bool
      bool
      bool

      True if the window size event has been handled by the appropriate delegate; false if it has not.

  • Size
    Size
    Size
    Size

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

    public Size Size { get; }public Size Size { get; }Public ReadOnly Property Size As Sizepublic Size Size { get; }

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Core.dll