Skip to content

Commit

Permalink
forward pointer wheel event from scrollbar to scrollviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
emmauss committed Jul 22, 2024
1 parent 4b494d9 commit e2844a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Avalonia.Controls/Primitives/ScrollBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,16 @@ protected override void OnKeyDown(KeyEventArgs e)
}
}

protected override void OnPointerWheelChanged(PointerWheelEventArgs e)
{
base.OnPointerWheelChanged(e);

if(!e.Handled && _owner?.Presenter is { } presenter)
{
presenter.RaiseEvent(e);
}
}

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
{
base.OnPropertyChanged(change);
Expand Down

0 comments on commit e2844a3

Please sign in to comment.