Browse Source

fix scrolling to selected item.

pull/2953/head
Dan Walmsley 7 years ago
parent
commit
e9ae26e09c
  1. 7
      src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

7
src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

@ -858,7 +858,7 @@ namespace Avalonia.Controls.Primitives
if (AutoScrollToSelectedItem)
{
ScrollIntoView(_selectedIndex);
ScrollIntoView(_selectedItem);
}
}
}
@ -1046,6 +1046,11 @@ namespace Avalonia.Controls.Primitives
removed?.Select(x => ElementAt(Items, x)).ToArray() ?? Array.Empty<object>());
RaiseEvent(e);
}
if(AutoScrollToSelectedItem)
{
ScrollIntoView(_selectedItem);
}
}
private void UpdateSelectedItems(Action action)

Loading…
Cancel
Save