diff --git a/src/Avalonia.Base/Interactivity/RoutedEventArgs.cs b/src/Avalonia.Base/Interactivity/RoutedEventArgs.cs
index ccbb41b7dc..60a6b64677 100644
--- a/src/Avalonia.Base/Interactivity/RoutedEventArgs.cs
+++ b/src/Avalonia.Base/Interactivity/RoutedEventArgs.cs
@@ -2,29 +2,59 @@ using System;
namespace Avalonia.Interactivity
{
+ ///
+ /// Provices state information and data specific to a routed event.
+ ///
public class RoutedEventArgs : EventArgs
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
public RoutedEventArgs()
{
}
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The routed event associated with these event args.
public RoutedEventArgs(RoutedEvent? routedEvent)
{
RoutedEvent = routedEvent;
}
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The routed event associated with these event args.
+ /// The source object that raised the routed event.
public RoutedEventArgs(RoutedEvent? routedEvent, IInteractive? source)
{
RoutedEvent = routedEvent;
Source = source;
}
+ ///
+ /// Gets or sets a value indicating whether the routed event has already been handled.
+ ///
+ ///
+ /// Once handled, a routed event should be ignored.
+ ///
public bool Handled { get; set; }
+ ///
+ /// Gets or sets the routed event associated with these event args.
+ ///
public RoutedEvent? RoutedEvent { get; set; }
+ ///
+ /// Gets or sets the routing strategy (direct, bubbling, or tunneling) of the routed event.
+ ///
public RoutingStrategies Route { get; set; }
+ ///
+ /// Gets or sets the source object that raised the routed event.
+ ///
public IInteractive? Source { get; set; }
}
}
diff --git a/src/Avalonia.Controls/Control.cs b/src/Avalonia.Controls/Control.cs
index d0bf24947b..827bded115 100644
--- a/src/Avalonia.Controls/Control.cs
+++ b/src/Avalonia.Controls/Control.cs
@@ -559,8 +559,8 @@ namespace Avalonia.Controls
var sizeChangedEventArgs = new SizeChangedEventArgs(
SizeChangedEvent,
source: this,
- newSize: new Size(newValue.Width, newValue.Height),
- previousSize: new Size(oldValue.Width, oldValue.Height));
+ previousSize: new Size(oldValue.Width, oldValue.Height),
+ newSize: new Size(newValue.Width, newValue.Height));
RaiseEvent(sizeChangedEventArgs);
}
diff --git a/src/Avalonia.Controls/SizeChangedEventArgs.cs b/src/Avalonia.Controls/SizeChangedEventArgs.cs
index d983e375c2..201a00a3fc 100644
--- a/src/Avalonia.Controls/SizeChangedEventArgs.cs
+++ b/src/Avalonia.Controls/SizeChangedEventArgs.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Avalonia.Interactivity;
+using Avalonia.Interactivity;
namespace Avalonia.Controls
{
@@ -12,25 +7,41 @@ namespace Avalonia.Controls
///
public class SizeChangedEventArgs : RoutedEventArgs
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The routed event associated with these event args.
public SizeChangedEventArgs(RoutedEvent? routedEvent)
: base (routedEvent)
{
}
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The routed event associated with these event args.
+ /// The source object that raised the routed event.
public SizeChangedEventArgs(RoutedEvent? routedEvent, IInteractive? source)
: base(routedEvent, source)
{
}
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The routed event associated with these event args.
+ /// The source object that raised the routed event.
+ /// The previous size (or bounds) of the object.
+ /// The new size (or bounds) of the object.
public SizeChangedEventArgs(
RoutedEvent? routedEvent,
IInteractive? source,
- Size newSize,
- Size previousSize)
+ Size previousSize,
+ Size newSize)
: base(routedEvent, source)
{
- NewSize = newSize;
PreviousSize = previousSize;
+ NewSize = newSize;
HeightChanged = newSize.Height != previousSize.Height;
WidthChanged = newSize.Width != previousSize.Width;
}