SfRangeSlider hangs with binding from ViewModel

If I create SfRangeSlider and bind it's values — app hangs completely.
At the same time exact same bindings with Label work perfectly fine (if i remove SfRangeSlider so it won't hang app).
What am I doing wrong?

FilterPage.xaml (arrows instead of angled brackets because with brackets forum's markup eats half of xaml code):
←?xml version="1.0" encoding="utf-8" ?→ 
←ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:xforms="clr-namespace:Syncfusion.SfRangeSlider.XForms;assembly=Syncfusion.SfRangeSlider.XForms"
x:Class="App1.Views.FilterPage"→ 
←ContentPage.Content→
←StackLayout Orientation="Vertical" Spacing="16" Margin="16"→
←StackLayout x:Name="priceFilterLabels" Orientation="Horizontal"→
←Label
x:Name="Min"
Text="{Binding OverallMinValue}"/→
←Label
Text=" : "/→
←Label
x:Name="Max"
Text="{Binding OverallMaxValue}"/→
←/StackLayout→
←xforms:SfRangeSlider
x:Name="slider"
SnapsTo="None"
Minimum="{Binding OverallMinValue}"
Maximum="{Binding OverallMaxValue}"
RangeStart="{Binding SelectedMinValue}"
RangeEnd="{Binding SelectedMaxValue}"
Orientation="Horizontal"/→
←/StackLayout→
←/ContentPage.Content→
←/ContentPage→

FilterPage.xaml.cs:
using App2.ViewModels;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
namespace App2.Views.Catalog
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class FiltersPage : ContentPage
{
public FiltersPage()
{
InitializeComponent();
this.BindingContext = new FilterViewModel();
}
}
}

FiltersViewModel.cs:
using Xamarin.Forms;
namespace App2.ViewModels
{
class FilterViewModel : BaseViewModel
{
private INavigation Navigation;
protected double _overallMinValue;
protected double _overallMaxValue;
protected double _selectedMinValue;
protected double _selectedMaxValue;
public double OverallMinValue
get => _overallMinValue;
set
{
_overallMinValue = value;
OnPropertyChanged();
}
}
public double OverallMaxValue
{
get => _overallMaxValue;
set
{
_overallMaxValue = value;
OnPropertyChanged();
}
}
public double SelectedMinValue
{
get => _selectedMinValue;
set
{
_selectedMinValue = value;
OnPropertyChanged();
}
}
public double SelectedMaxValue
{
get => _selectedMaxValue;
set
{
_selectedMaxValue = value;
OnPropertyChanged();
}
}

public FilterViewModel()
{
_overallMinValue = 1888777;
_overallMaxValue = 99888777;
_selectedMinValue = 2000000;
_selectedMaxValue = 90000000;
}
}
}


4 Replies 1 reply marked as answer

SS Suganya Sethuraman Syncfusion Team August 18, 2020 09:31 AM UTC

Hi Vincent,

Greetings from Syncfusion,

We have prepared the sample with the code snippet provided. We have set the TickFrequency API. Please use the below sample to resolve the issue,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/RangeSliderSample-1109167665

Please let us know if you have any concerns.

Regards,
Suganya Sethuraman.
 


Marked as answer

VM Vincent Montgomery August 18, 2020 10:54 AM UTC

Yeah, that solved the problem, thanks!
Can you also help me to disable animation effects of moving thumb? I want it be same size all the time. Or should I create a new topic?


SS Suganya Sethuraman Syncfusion Team August 19, 2020 12:57 PM UTC

Hi Vincent,
 
Query 1: “SfRangeSlider hangs with binding from ViewModel”

Thanks for the feedback.

We are glad to know that the given solution works.

Query 2: Disable animation effects of moving thumb

Currently, we do not have the support for “Disable animation effects of moving thumb” but we have logged a feature request on this and it can be tracked through our feedback portal below,

Link:
https://www.syncfusion.com/feedback/17111

If you have any more specifications/suggestions on this, you can add it as a comment in the portal.

This feature will be available in our upcoming Volume 4 main release which is expected to be rolled out at the end of December 2020.

Regards,
Suganya Sethuraman.
 



SS Suganya Sethuraman Syncfusion Team December 17, 2020 02:52 PM UTC

Hi Vincent,

We are glad to announce that our Essential Studio 2020 Volume 4 release v18.4.0.30 is rolled out and is available for download under the following link.

https://www.syncfusion.com/forums/160733/essential-studio-2020-volume-4-release-v18-4-0-30-is-available-for-download

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Suganya Sethuraman
 


Loader.
Up arrow icon