Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

WindowSizeChangedEventArgs Class

Definition

Namespace:
Windows.UI.Core

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Contains the argument returned by a window size change event.

public ref class WindowSizeChangedEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WindowSizeChangedEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WindowSizeChangedEventArgs
Public NotInheritable Class WindowSizeChangedEventArgs
Inheritance
Object Platform::Object IInspectable WindowSizeChangedEventArgs
Attributes
Implements

Windows requirements

Requirements Description
Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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

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

Properties

Name Description
Handled

Gets or sets whether the window size event was handled.

Size

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

Applies to


Feedback

Was this page helpful?