Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 24dedb39 authored by Harald Martini's avatar Harald Martini
Browse files

Fixed error in autoscrollbehavior when deleting an element from the source collection

parent 87c49078
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,9 @@ namespace VECTO3GUI2020.Behaviours
private void SourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
var newIndex = e.NewStartingIndex;
if (newIndex < 0) {
return;
}
Dispatcher.CurrentDispatcher.BeginInvoke(
DispatcherPriority.ApplicationIdle,
new Action(() => this.AssociatedObject.ScrollIntoView(this.AssociatedObject.Items[newIndex]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment