From c7560588fb0d80c02dd9a59965f6ecf53270f36e Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 3 Jan 2022 19:23:07 +0100 Subject: [PATCH] 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. --- src/Avalonia.Controls.DataGrid/DataGrid.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.Controls.DataGrid/DataGrid.cs b/src/Avalonia.Controls.DataGrid/DataGrid.cs index 95ee73be4e..d61685932d 100644 --- a/src/Avalonia.Controls.DataGrid/DataGrid.cs +++ b/src/Avalonia.Controls.DataGrid/DataGrid.cs @@ -2215,7 +2215,14 @@ namespace Avalonia.Controls /// PointerWheelEventArgs 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)