Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Issue: RangeSlider DataBinding [21135]

$
0
0
Hi,

I have a RangeSlider in a DataTemplate. The Binding to LowerValue and HigherValue does not work correctly.

```
<DataTemplate DataType="{x:Type vm:NumericFilter}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBox x:Name="tbSelectedMin"
Text="{Binding Path=SelectedMin}"
HorizontalAlignment="Left" />
<Button Content="Reset"
Command="{Binding Path=ResetCommand}"
HorizontalAlignment="Center" />
<TextBox x:Name="tbSelctedMax"
Text="{Binding Path=SelectedMax}"
HorizontalAlignment="Right" />
<xctk:RangeSlider x:Name="rsRange"
Grid.Row="1"
Minimum="{Binding Path=Min}"
Maximum="{Binding Path=Max}"
HigherValue="{Binding Path=SelectedMax, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
LowerValue="{Binding Path=SelectedMin,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</DataTemplate>
```

while "normal" sliders work as expected:
```
<StackPanel Grid.Row="1">
<Slider Minimum="{Binding Path=Min}"
Maximum="{Binding Path=Max}"
Value="{Binding Path=SelectedMin, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<Slider Minimum="{Binding Path=Min}"
Maximum="{Binding Path=Max}"
Value="{Binding Path=SelectedMax, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
```
Comments: ** Comment from web user: skybluecodeflier **

I'm still seeing this issue in 2.3. See attached project. The HigherValue property didn't bind properly at the start, and as soon as you move the lower slider the LowerValue property loses its binding.


Viewing all articles
Browse latest Browse all 4964


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>