Windows Dev Center

SizeChangedEventArgs class

Provides data related to the FrameworkElement.SizeChanged event.

Inheritance

Object
  RoutedEventArgs
    SizeChangedEventArgs

Syntax


public sealed class SizeChangedEventArgs : RoutedEventArgs

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The SizeChangedEventArgs class has these types of members:

Methods

The SizeChangedEventArgs class inherits methods from the Object class.

Properties

The SizeChangedEventArgs class has these properties.

PropertyAccess typeDescription

NewSize

Read-onlyGets the new size of the object reporting the size change.

OriginalSource

Read-onlyGets a reference to the object that raised the event. This is often a template part of a control rather than an element that was declared in your app UI. (Inherited from RoutedEventArgs)

PreviousSize

Read-onlyGets the previous size of the object reporting the size change.

 

Remarks

The PreviousSize value is based on ActualHeight and ActualWidth values on the element before the layout change that motivated the SizeChanged event. The NewSize value is based on the ActualHeight and ActualWidth values after the layout change is processed.

There's another event named SizeChanged that's defined by the Window class. Event handlers for Window.SizeChanged use the WindowSizeChangedEventArgs class for data. Window.SizeChanged can occur in some of the same circumstances that FrameworkElement.SizeChanged occurs; for more info, see FrameworkElement.SizeChanged.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

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

Metadata

Windows.winmd

See also

Object
FrameworkElement.SizeChanged
RoutedEventArgs
ActualHeight
ActualWidth

 

 

Show:
© 2015 Microsoft