Skip to content

Commit

Permalink
Merge pull request #6187 from amwx/ItemsRepeater_MoveItems
Browse files Browse the repository at this point in the history
Allow moving items in ItemsRepeater
  • Loading branch information
grokys authored and Dan Walmsley committed Jul 7, 2021
1 parent fae663c commit 16ceff9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Avalonia.Layout/ElementManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,10 @@ public void DataSourceChanged(object source, NotifyCollectionChangedEventArgs ar
break;

case NotifyCollectionChangedAction.Move:
throw new NotImplementedException();
int size = args.OldItems != null ? args.OldItems.Count : 1;
OnItemsRemoved(args.OldStartingIndex, size);
OnItemsAdded(args.NewStartingIndex, size);
break;
}
}
}
Expand Down

0 comments on commit 16ceff9

Please sign in to comment.