diff --git a/src/Avalonia.Controls.TreeDataGrid/TreeDataGrid.cs b/src/Avalonia.Controls.TreeDataGrid/TreeDataGrid.cs index 697de359..b63aab61 100644 --- a/src/Avalonia.Controls.TreeDataGrid/TreeDataGrid.cs +++ b/src/Avalonia.Controls.TreeDataGrid/TreeDataGrid.cs @@ -583,7 +583,7 @@ private void OnDragOver(DragEventArgs e) if (route.HasHandlers) { - var ev = new TreeDataGridRowDragEventArgs(row, e); + var ev = new TreeDataGridRowDragEventArgs(RowDragOverEvent, row, e); ev.Position = adorner; RaiseEvent(ev); adorner = ev.Position; @@ -618,7 +618,7 @@ private void OnDrop(DragEventArgs e) if (route.HasHandlers) { - var ev = new TreeDataGridRowDragEventArgs(row, e); + var ev = new TreeDataGridRowDragEventArgs(RowDropEvent, row, e); ev.Position = position; RaiseEvent(ev); diff --git a/src/Avalonia.Controls.TreeDataGrid/TreeDataGridRowDragEventArgs.cs b/src/Avalonia.Controls.TreeDataGrid/TreeDataGridRowDragEventArgs.cs index 6112e6f3..7fc5447a 100644 --- a/src/Avalonia.Controls.TreeDataGrid/TreeDataGridRowDragEventArgs.cs +++ b/src/Avalonia.Controls.TreeDataGrid/TreeDataGridRowDragEventArgs.cs @@ -21,10 +21,11 @@ public class TreeDataGridRowDragEventArgs : RoutedEventArgs /// /// Initializes a new instance of the class. /// + /// The event being raised. /// The row that is being dragged over. /// The inner drag event args. - public TreeDataGridRowDragEventArgs(TreeDataGridRow row, DragEventArgs inner) - : base(TreeDataGrid.RowDragOverEvent) + public TreeDataGridRowDragEventArgs(RoutedEvent routedEvent, TreeDataGridRow row, DragEventArgs inner) + : base(routedEvent) { TargetRow = row; Inner = inner;