SizeChangedEventArgs Class
Definition
Provides data specific to a SizeChanged event.
public class SizeChangedEventArgs
Constructors
| Name | Description |
|---|---|
| SizeChangedEventArgs (3 overloads) | Initializes a new instance of the Avalonia.Controls.SizeChangedEventArgs class. |
SizeChangedEventArgs overloads
SizeChangedEventArgs Constructor
Initializes a new instance of the Avalonia.Controls.SizeChangedEventArgs class.
public SizeChangedEventArgs(Avalonia.Interactivity.RoutedEvent routedEvent)
Parameters
routedEvent Avalonia.Interactivity.RoutedEvent
The routed event associated with these event args.
SizeChangedEventArgs Constructor
Initializes a new instance of the Avalonia.Controls.SizeChangedEventArgs class.
public SizeChangedEventArgs(Avalonia.Interactivity.RoutedEvent routedEvent, object source)
Parameters
routedEvent Avalonia.Interactivity.RoutedEvent
The routed event associated with these event args.
source object
The source object that raised the routed event.
SizeChangedEventArgs Constructor
Initializes a new instance of the Avalonia.Controls.SizeChangedEventArgs class.
public SizeChangedEventArgs(Avalonia.Interactivity.RoutedEvent routedEvent, object source, Avalonia.Size previousSize, Avalonia.Size newSize)
Parameters
routedEvent Avalonia.Interactivity.RoutedEvent
The routed event associated with these event args.
source object
The source object that raised the routed event.
previousSize Avalonia.Size
The previous size (or bounds) of the object.
newSize Avalonia.Size
The new size (or bounds) of the object.
Properties
| Name | Description |
|---|---|
| HeightChanged | Gets a value indicating whether the height of the new size is considered different than the previous size height. |
| NewSize | Gets the new size (or bounds) of the object. |
| PreviousSize | Gets the previous size (or bounds) of the object. |
| WidthChanged | Gets a value indicating whether the width of the new size is considered different than the previous size width. |
| Handled | Gets or sets a value indicating whether the routed event has already been handled. Inherited from RoutedEventArgs. |
| Route | Gets or sets the routing strategy (direct, bubbling, or tunneling) of the routed event. Inherited from RoutedEventArgs. |
| RoutedEvent | Gets or sets the routed event associated with these event args. Inherited from RoutedEventArgs. |
| Source | Gets or sets the source object that raised the routed event. Inherited from RoutedEventArgs. |
HeightChanged Property
Gets a value indicating whether the height of the new size is considered different than the previous size height.
public bool HeightChanged { get; set; }
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 Property
Gets the new size (or bounds) of the object.
public Avalonia.Size NewSize { get; set; }
PreviousSize Property
Gets the previous size (or bounds) of the object.
public Avalonia.Size PreviousSize { get; set; }
WidthChanged Property
Gets a value indicating whether the width of the new size is considered different than the previous size width.
public bool WidthChanged { get; set; }
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.