Adding new line in string of label items of a sfRangeSlider

Hi everyone, 

Currently, I'm using syncfusion sfRangeSlider in one of the pages developed in a Xamarin.Form app. The instance of sfRangeSlider has muliple ticks and labels. In some cases, I need to add a line break on a string of a label, so I try the following :
                
                rangeSlider = new SfRangeSlider();
                rangeSlider.Orientation = Orientation.Horizontal;
                rangeSlider.TickPlacement = TickPlacement.Inline;
                rangeSlider.ShowRange = false;
                RangeSliderLabelCollection = new RangeSliderLabelViewModel();
        
                rangeSlider.ShowCustomLabel = true;
                rangeSlider.ShowValueLabel = false;
                rangeSlider.BindingContext = RangeSliderLabelCollection;
                rangeSlider.SetBinding(SfRangeSlider.CustomLabelsProperty, "Items");
                rangeSlider.LabelPlacement = LabelPlacement.BottomRight;

               for (var i = 0; i <= 48; i++) {
                         var label = "Line 1" + "\r\n  New Line ";
     RangeSliderLabelCollection.Items.Add(new Items() { Label = label, Value = i,  });
     //expected result per line
     //Line 1
     //New Line                    
               }

This works perfectly in the iOS platform. However, I don't get the same behavior with the Android platform. Instead of starting a new line in the text label, it adds the string "New Line" in the same line.
     //Android Result per line
     //Line 1 New Line

Any ideas of why does this happen?

3 Replies

RB Rabhia Beham Kathar Mideenar Syncfusion Team April 6, 2018 12:27 PM UTC

Hi Andres,

We have checked the reported behaviour in SfRangeslider Control. We could able to reproduce the same. We are currently fixing the reported issue and fix will be included in Volume 1 Sp 2 Release which is expected to be rolled out by the end of April.

Please let us know if you have any concern.

Regards,
Rabhia Beham K.



NJ Nat Joyner June 18, 2018 07:35 PM UTC

Hi I am working on the same project with Andres. We got the latest update for the Android SfRangeSlider control (16.1.0.37) released in April however we are still hitting the same issue with NewLine characters in the Label property not working correctly. Is there a workaround for this?


SS Sridevi Sivakumar Syncfusion Team June 19, 2018 12:21 PM UTC

Hi Andres Reales ,

Sorry for inconvenience.
We already fixed the issue “Adding new line in string of label items of a sfRangeSlider”  in our source This fix will be included in our upcoming volume 2 release which will be rolled out in couple of days.

Regards
Sridevi S
 
  



Loader.
Up arrow icon