SizeChangedEventArgs class

Applies to Windows and Windows Phone

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

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

FrameworkElement.SizeChanged
RoutedEventArgs
ActualHeight
ActualWidth

 

 

Show:
© 2014 Microsoft