<rangeSlider:SfRangeSlider x:Name="range" Minimum="0" " Maximum="10" Value="3"/>
<rangeSlider:SfRangeSlider BindingContext="{x:Reference Name=range Minimum="{Binding Path=Value, Converter={StaticResource doubleToInt}}" Maximum="10" /> |
<rangeSlider:SfRangeSlider
x:Name="rangeSlider1"
Minimum="0"
RangeEnd="{Binding RangeSliderEnd}"
RangeStart="{Binding RangeSliderStart}"
ShowValueLabel="True" Orientation="Horizontal"
PropertyChanged="RangeSlider1_PropertyChanged"
TickFrequency="20"
Maximum="100"
ShowRange="True"/>
<rangeSlider:SfRangeSlider
x:Name="rangeSlider2"
RangeStart="{Binding InternalRangeStart}"
Orientation="Horizontal"
ShowValueLabel="True"
TickFrequency="20"
Minimum="0"
PropertyChanged="RangeSlider2_PropertyChanged"
Maximum="100"
ShowRange="True" />
|
private void RangeSlider2_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "RangeStart")
{
if (rangeSlider2.RangeStart <= rangeSlider1.RangeStart)
{
viewModel.InternalRangeStart = rangeSlider1.RangeStart;
}
}
} |
private void RangeSlider1_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
var rangeSlider = sender as SfRangeSlider;
var rangeStart = rangeSlider.RangeStart + 2;
if (e.PropertyName == "RangeStart")
{
viewModel.InternalRangeStart = rangeSlider.RangeStart;
if (rangeSlider.RangeEnd <= rangeStart)
{
viewModel.RangeSliderStart = rangeSlider.RangeEnd - 2;
}
}
else if (e.PropertyName == "RangeEnd")
{
if (rangeSlider.RangeEnd <= rangeStart)
{
viewModel.RangeSliderEnd = rangeStart;
}
}
} |
Note: Before applying the patch, please clear the cache
|