You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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!
Add a
StepWidth
property of typeNullable<double>
to aXamarin.Forms.Slider
. Default valuenull
.(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 fromMinimum
).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.The text was updated successfully, but these errors were encountered: