Class SizeChangedEventArgs
Provides data specific to a SizeChanged event.
public class SizeChangedEventArgs : RoutedEventArgs
- Inheritance
-
SizeChangedEventArgs
- Inherited Members
Constructors
SizeChangedEventArgs(RoutedEvent?)
Initializes a new instance of the SizeChangedEventArgs class.
public SizeChangedEventArgs(RoutedEvent? routedEvent)
Parameters
routedEvent
RoutedEventThe routed event associated with these event args.
SizeChangedEventArgs(RoutedEvent?, object?)
Initializes a new instance of the SizeChangedEventArgs class.
public SizeChangedEventArgs(RoutedEvent? routedEvent, object? source)
Parameters
routedEvent
RoutedEventThe routed event associated with these event args.
source
objectThe source object that raised the routed event.
SizeChangedEventArgs(RoutedEvent?, object?, Size, Size)
Initializes a new instance of the SizeChangedEventArgs class.
public SizeChangedEventArgs(RoutedEvent? routedEvent, object? source, Size previousSize, Size newSize)
Parameters
routedEvent
RoutedEventThe routed event associated with these event args.
source
objectThe source object that raised the routed event.
previousSize
SizeThe previous size (or bounds) of the object.
newSize
SizeThe new size (or bounds) of the object.
Properties
HeightChanged
Gets a value indicating whether the height of the new size is considered different than the previous size height.
public bool HeightChanged { get; }
Property Value
Remarks
This will take into account layout epsilon and will not be true if both heights are considered equivalent for layout purposes. Remember there can be small variations in the calculations between layout cycles due to rounding and precision even when the size has not otherwise changed.
NewSize
Gets the new size (or bounds) of the object.
public Size NewSize { get; init; }
Property Value
PreviousSize
Gets the previous size (or bounds) of the object.
public Size PreviousSize { get; init; }
Property Value
WidthChanged
Gets a value indicating whether the width of the new size is considered different than the previous size width.
public bool WidthChanged { get; }
Property Value
Remarks
This will take into account layout epsilon and will not be true if both widths are considered equivalent for layout purposes. Remember there can be small variations in the calculations between layout cycles due to rounding and precision even when the size has not otherwise changed.