Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DataGrid scroll should behave the same as ScrollViewer #12787

Merged

Conversation

timunie
Copy link
Contributor

@timunie timunie commented Sep 5, 2023

What does the pull request do?

Makes sure scrolling on DataGrid behaves the same as "normal" ScrollViewer.

What is the current behavior?

Holding [Shift] doesn't scroll horizontally on DataGrid (at least using Windows 11). This was fixed before by #7520 but was lost during code refractor.

What is the updated/expected behavior with this PR?

Scrolling behaves the same on every control and OS. Holding [Shift] will scroll horizontally

How was the solution implemented (if it's not obvious)?

copied the needed code from ScrollContentPresenter

Checklist

  • Added unit tests (if possible)? -> I'd like to add some UnitTests, but don't know how. If someone can guide me, I'll implement it.
  • Added XML documentation to any related classes?
  • Consider submitting a PR to https://github.com/AvaloniaUI/Documentation with user documentation

Breaking changes

Obsoletions / Deprecations

Fixed issues

None as far as I can see

if the user holds [Shift], we need to swap e.Delta (e.g. on Windows) if not already done by the OS (e.g. using Mac).
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0039209-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Sep 6, 2023
Merged via the queue into AvaloniaUI:master with commit 341dcce Sep 6, 2023
6 checks passed
@timunie timunie deleted the fix/DataGridShiftHorizontalScroll branch September 6, 2023 08:58
@timunie timunie added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Sep 29, 2023
grokys pushed a commit that referenced this pull request Oct 2, 2023
if the user holds [Shift], we need to swap e.Delta (e.g. on Windows) if not already done by the OS (e.g. using Mac).
@grokys grokys added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants