@ -1,5 +1,6 @@
using System ;
using System ;
using System.Diagnostics ;
using System.Diagnostics ;
using Avalonia.Platform ;
using Avalonia.Threading ;
using Avalonia.Threading ;
namespace Avalonia.Input.GestureRecognizers
namespace Avalonia.Input.GestureRecognizers
@ -13,7 +14,8 @@ namespace Avalonia.Input.GestureRecognizers
private bool _ canHorizontallyScroll ;
private bool _ canHorizontallyScroll ;
private bool _ canVerticallyScroll ;
private bool _ canVerticallyScroll ;
private bool _ isScrollInertiaEnabled ;
private bool _ isScrollInertiaEnabled ;
private int _ scrollStartDistance = 3 0 ;
private readonly static int s_defaultScrollStartDistance = ( int ) ( ( AvaloniaLocator . Current ? . GetService < IPlatformSettings > ( ) ? . GetTapSize ( PointerType . Touch ) . Height ? ? 1 0 ) / 2 ) ;
private int _ scrollStartDistance = s_defaultScrollStartDistance ;
private bool _ scrolling ;
private bool _ scrolling ;
private Point _ trackedRootPoint ;
private Point _ trackedRootPoint ;
@ -54,7 +56,7 @@ namespace Avalonia.Input.GestureRecognizers
public static readonly DirectProperty < ScrollGestureRecognizer , int > ScrollStartDistanceProperty =
public static readonly DirectProperty < ScrollGestureRecognizer , int > ScrollStartDistanceProperty =
AvaloniaProperty . RegisterDirect < ScrollGestureRecognizer , int > ( nameof ( ScrollStartDistance ) ,
AvaloniaProperty . RegisterDirect < ScrollGestureRecognizer , int > ( nameof ( ScrollStartDistance ) ,
o = > o . ScrollStartDistance , ( o , v ) = > o . ScrollStartDistance = v ,
o = > o . ScrollStartDistance , ( o , v ) = > o . ScrollStartDistance = v ,
unsetValue : 3 0 ) ;
unsetValue : s_defaultScrollStartDistance ) ;
/// <summary>
/// <summary>
/// Gets or sets a value indicating whether the content can be scrolled horizontally.
/// Gets or sets a value indicating whether the content can be scrolled horizontally.