diff --git a/src/Avalonia.Controls/VirtualizingStackPanel.cs b/src/Avalonia.Controls/VirtualizingStackPanel.cs index dfacb93eeb..e86a0de657 100644 --- a/src/Avalonia.Controls/VirtualizingStackPanel.cs +++ b/src/Avalonia.Controls/VirtualizingStackPanel.cs @@ -1088,7 +1088,7 @@ namespace Avalonia.Controls ++newIndex; } - if (realizedIndex <= 0) + if (realizedIndex < 0) { // The insertion point was before the first element, update the first index. _firstIndex += count;