Skip to content

Conversation

@Hertzole
Copy link

@Hertzole Hertzole commented Feb 11, 2025

Fixes #3393

Problem

Smooth scrolling was recently added and not everyone enjoys that.

Solution

Add an option to toggle smooth scrolling. I added it under Display -> Other options
Smooth scrolling option

The option applies to everywhere ScrollViewer is used and ZoomScrollView, which seems to just be the options dialog and the main text editor.

This PR is currently blocked due to needing a bug fix in TomsToolbox tom-englert/TomsToolbox#20, hence the draft

@christophwille
Copy link
Member

I think PR #3403 contained the necessary NuGet update for you.

@Hertzole Hertzole marked this pull request as ready for review February 19, 2025 17:43

<Style TargetType="ScrollViewer">
<Setter Property="toms:AdvancedScrollWheelBehavior.Attach" Value="WithAnimation" />
<Style.Triggers>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As written in the documentation, Attach is a shortcut and should only be used if you want to go with the default only.
If you want to control the behavior, you should not attach and detach it, but use the full behavior notation and simply configure the properties of interest. (now I understand the intend of tom-englert/TomsToolbox#20, this was not necessary at all)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not aware of the method you used in your implementation, hence this rudimentary implementation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree this is a bit hidden, in xaml VS does not show the documentation directly when hovering...

@Hertzole
Copy link
Author

I'd say to go with #3405 instead of this since it's already fixed and Tom seems to know more about this than I do. I'm just glad there will be an option to turn off smooth scrolling. :)

@Hertzole Hertzole closed this Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turn off smooth scrolling

4 participants