Browse Source

use `ScrollViewer.GetBubbleUpScrollOnEndReached` in `DataGrid`

DataGrid handles the scrolling by it's own and not via ScrollViewer, so we need handle it there as well.
pull/7279/head
Tim 5 years ago
committed by Tim U
parent
commit
c7560588fb
  1. 9
      src/Avalonia.Controls.DataGrid/DataGrid.cs

9
src/Avalonia.Controls.DataGrid/DataGrid.cs

@ -2215,7 +2215,14 @@ namespace Avalonia.Controls
/// <param name="e">PointerWheelEventArgs</param>
protected override void OnPointerWheelChanged(PointerWheelEventArgs e)
{
e.Handled = e.Handled || UpdateScroll(e.Delta * DATAGRID_mouseWheelDelta);
if(UpdateScroll(e.Delta * DATAGRID_mouseWheelDelta))
{
e.Handled = true;
}
else
{
e.Handled = e.Handled || !ScrollViewer.GetBubbleUpScrollOnEndReached(this);
}
}
internal bool UpdateScroll(Vector delta)

Loading…
Cancel
Save