infinity loop when value is smaller than zero due to rounding

Hallo together,


when using the SfRangeSlider and set the Minimum to 0 and the Maximum to 0.02 and bind a value like 0.0036, the SfRangeSlider returns to the binding the value = 0.00359999993816018, which starts a infinity loop. This is only on android, IOS works fine. It seem I have only the effect, when I work with values smaller than 1


KnobColor="LightSlateGray"

LabelPlacement="TopLeft"

Minimum="0"

Maximum="0.02"

Orientation="Horizontal"

ShowRange="False"

ShowValueLabel="True"

StepFrequency="0.00001"

ThumbSize="1"

TickColor="Black"

TickPlacement="Inline"

ToolTipPlacement="None"

ToolTipPrecision="2"

TrackColor="DarkGray"

TrackSelectionColor="DeepSkyBlue"

TrackSelectionThickness="1"

TrackThickness="3"

ValuePlacement="BottomRight"

Value="{Binding CrrTireBSlider, Mode=TwoWay}">


private double _crrTireBSlider;

public double CrrTireBSlider

{

get { return Math.Round(_crrTireBSlider, 5); }

set

{

this._crrTireBSlider = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("CrrTireBSlider"));

}

}


Thanks Markus


1 Reply

SS Suganya Sethuraman Syncfusion Team October 1, 2021 10:51 AM UTC

Hi Markus,

Greetings from Syncfusion.

We have analyzed the reported issue. We would like to point out that we don't round off the value in the CrrTireBSlider property get. If you want to round off the value in certain places, you can do so.

Code snippet
 
        private double _crrTireBSlider; 
        public double CrrTireBSlider 
        { 
            get { return _crrTireBSlider; } 
            set 
            { 
                this._crrTireBSlider = value; 
                NotifyPropertyChanged(); 
            } 
        } 

Please let us know if you have any concerns.

Regards,
Suganya Sethuraman.
 


Loader.
Up arrow icon