diff --git a/src/Avalonia.Controls/VirtualizingStackPanel.cs b/src/Avalonia.Controls/VirtualizingStackPanel.cs index e235d3147485..7934e0ccc6b8 100644 --- a/src/Avalonia.Controls/VirtualizingStackPanel.cs +++ b/src/Avalonia.Controls/VirtualizingStackPanel.cs @@ -842,6 +842,8 @@ private void RecycleElementOnItemRemoved(Control element) { Debug.Assert(ItemContainerGenerator is not null); + _scrollAnchorProvider?.UnregisterAnchorCandidate(element); + var recycleKey = element.GetValue(RecycleKeyProperty); if (recycleKey is null || recycleKey == s_itemIsItsOwnContainer)