From 66e01468983b073d012d01f047abe4aae34823d5 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 3 Jul 2019 13:05:02 +0200 Subject: [PATCH] Set default cache size to 0. Scrolling on UWP happens asynchronous to the UI thread, so `ItemsRepeater` on that platform generate an additional buffer of prepared elements sufficient to fill an area larger than the viewport. We don't have async scroll rendering on Avalonia so make the default cache size 0. --- src/Avalonia.Controls/Repeater/ViewportManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/Repeater/ViewportManager.cs b/src/Avalonia.Controls/Repeater/ViewportManager.cs index 6f0e792aa5..10c11889d0 100644 --- a/src/Avalonia.Controls/Repeater/ViewportManager.cs +++ b/src/Avalonia.Controls/Repeater/ViewportManager.cs @@ -35,8 +35,8 @@ namespace Avalonia.Controls // actually happened. This can happen in cases where no scrollviewer // in the parent chain can scroll in the shift direction. private Point _unshiftableShift; - private double _maximumHorizontalCacheLength = 2.0; - private double _maximumVerticalCacheLength = 2.0; + private double _maximumHorizontalCacheLength = 0.0; + private double _maximumVerticalCacheLength = 0.0; private double _horizontalCacheBufferPerSide; private double _verticalCacheBufferPerSide; private bool _isBringIntoViewInProgress;