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

Add Slider StepWidth property #3351

Closed
charlesroddie opened this issue Jul 20, 2018 · 1 comment
Closed

Add Slider StepWidth property #3351

charlesroddie opened this issue Jul 20, 2018 · 1 comment

Comments

@charlesroddie
Copy link

charlesroddie commented Jul 20, 2018

Add a StepWidth property of type Nullable<double> to a Xamarin.Forms.Slider. Default value null.

(This could be named StepFrequency to follow UWP (StepFrequency) and WPF (TickFrequency), although calling width frequency as these platforms do is not very accurate as frequency should be inversely proportional to width.)

A null StepWidth results in an effectively continuous range of output. It is OK to maintain 1000 steps here on platforms where this is default, since this is close to continuous to the user.

Otherwise the slider snaps to intervals of StepWidth (starting from Minimum).

Some work on StepWidth/Frequency was initially done by @paymicro as part if #3141 to fix a UWP bug, but was removed from the PR, and @hartez suggested posting a new issue to address StepWidth more generally.

Implementation:

On platforms that have an equivalent property, this should be set from StepWidth.
On platforms that don't (including iOS) the slider Value should always return a number in the set {Minimum + StepWidth * n}, returning the nearest number to the underlying value in the set. When finished dragging, and when Minimum or StepWidth are changed, the underlying value should be set to the nearest point in the set.

@pauldipietro pauldipietro added this to New in Triage Jul 20, 2018
@PureWeen PureWeen removed this from New in Triage Jul 20, 2018
@PureWeen PureWeen added the e/4 🕓 4 label Jul 20, 2018
@samhouts samhouts added this to Under consideration in Enhancements Feb 5, 2019
@samhouts samhouts moved this from Under consideration to Needs Specification in Enhancements Feb 6, 2019
@samhouts samhouts moved this from Needs Design Review to Under consideration in Enhancements Feb 12, 2020
@jfversluis
Copy link
Member

Thanks for this suggestion! As Xamarin.Forms is now in maintenance mode, this will not happen anymore for Xamarin.Forms. We're only adding bugfixes and stability fixes.

If this is still important to you, make sure to check the .NET MAUI repo and see if it's already on the roadmap. If not, feel free to open a discussion to discuss a change first or open an issue with a detailed feature request. Thanks!

Enhancements automation moved this from Under consideration to Closed Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Enhancements
  
Closed
Development

No branches or pull requests

4 participants