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

Improve RangeSlider #574

Open
wants to merge 4 commits into
base: 2.1.0
Choose a base branch
from

Conversation

timunie
Copy link
Contributor

@timunie timunie commented May 27, 2024

Descrition of changes

  • Use CoerceValue where possible (same as Slider in Avalonia uses)
  • Add property to control snap behavior IsSnapToStepFrequencyEnabled (not everyone may like it, same as Slider in Avalonia)
  • SnapToFrequency should be handled in input events, not in PropertyChanged (don't touch Values from the ViewModel sent)

To test the RangeSlider

I added a minimum sample to SandBox. Can revert this change before merging if you want me to

Tests

Well ... Need to think about useful tests later on, if that PR gets accepted.

Fixed issues

Fixes #568

timunie and others added 4 commits May 27, 2024 14:47
- Use CoerceValue where possible (same as Slider in Avalonia uses)
- Add property to control SnapBehavior (not everyone may like it, same as Slider in Avalonia)
- SnapToFrequency should be handled in input events, not in PropertyChanged (don't touch Values from the ViewModel sent)
- Do not crash when closing the App due to reset DataContext in CoerceValue
- Make sure to follow Snap when pointer down outside the handles
@timunie
Copy link
Contributor Author

timunie commented Aug 9, 2024

Hi @amwx

since 2.1.0 seems to be released already, should I switch target branch?

@dowdybrown
Copy link

We use the RangeSlider in our project and can't update to Avalonia 11.1.x until this pull request is approved and released. I would be happy to provide any assistance needed toward that end.

@timunie
Copy link
Contributor Author

timunie commented Sep 26, 2024

@dowdybrown found out that the underlaying issue is solved in latest Avalonia nightly. However FA needs some updates to handle this version so we will need to wait for a fix or build FA on our own.

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.

2 participants