Skip to content

Commit

Permalink
Merge pull request #157 from AvaloniaUI/fixes/row-drop-event
Browse files Browse the repository at this point in the history
Correctly raise the RowDrop event.
  • Loading branch information
grokys committed Mar 28, 2023
1 parent a9e59bb commit a7d1fc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Avalonia.Controls.TreeDataGrid/TreeDataGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ public class TreeDataGridRowDragEventArgs : RoutedEventArgs
/// <summary>
/// Initializes a new instance of the <see cref="TreeDataGridRowDragEventArgs"/> class.
/// </summary>
/// <param name="routedEvent">The event being raised.</param>
/// <param name="row">The row that is being dragged over.</param>
/// <param name="inner">The inner drag event args.</param>
public TreeDataGridRowDragEventArgs(TreeDataGridRow row, DragEventArgs inner)
: base(TreeDataGrid.RowDragOverEvent)
public TreeDataGridRowDragEventArgs(RoutedEvent routedEvent, TreeDataGridRow row, DragEventArgs inner)
: base(routedEvent)
{
TargetRow = row;
Inner = inner;
Expand Down

0 comments on commit a7d1fc6

Please sign in to comment.