This is a migrated thread and some comments may be shown as answers.

RadSlider ValueChanged fired repeatedly

4 Answers 268 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 22 Feb 2011, 02:48 PM
Hello,

We have a custom control that contains a RadSlider whose value goes from its current value to the min or max respectively when ticked up or down.  So if by default the slider value is 5 and I click the down-tick button, the ValueChanged event gets fired repeatedly with successivly smaller values until min is reached - so 5, 4, 3, 2, 1. 

<telerik:RadSlider
       x:Name="PART_ZoomSlider"
       Grid.ColumnSpan="1"
       HorizontalAlignment="Center"
       Maximum="20"
       Minimum="1"
       Delay="10"
       RepeatInterval="100"       
       Value="{TemplateBinding ZoomLevel}"
       Style="{StaticResource MapSlider}"
       VerticalAlignment="Stretch" Grid.Row="2" d:LayoutOverrides="GridBox"/>

Does anyone know what is causing the event to be invoked in such a way?

Thanks,

4 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 25 Feb 2011, 01:15 PM
Hi Robert,

I prepared a sample test project for you. The minimum of the slider is 1, the maximum is 9, the initial value is 5. By default the SmallChange property is 0.1 and it determines which is the step of the Decrease/Increase handlers. ValueChanged fires when you change the slider value both with mouse or with Increase/Decrease handler buttons. Could you please elaborate more on your scenario and let us know if we have missed something? You could also send us a runnable sample and we could investigate your issue in depth.

Kind regards,
Petar Mladenov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Nazar
Top achievements
Rank 1
answered on 16 Jun 2011, 12:44 PM
I'm struggling with same issue!
When I click on left/right handles it does like Robert said, until max or min value reached. It looks like mouse left button is stuck over handles.
Here is my XAML:
<telerik:RadSlider Minimum="1" Maximum="{Binding MaxSelectedDayPart}" SmallChange="1" LargeChange="1"
                             Value="{Binding SelectedDayPart, Mode=TwoWay}" TickPlacement="Both"
                             Width="200" HandlesVisibility="Visible" TickFrequency="1" Grid.Column="1" Grid.Row="0"
                             IsSnapToTickEnabled="True"/>
<telerik:RadSlider Minimum="1" Maximum="7" 
                             SmallChange="1" LargeChange="1"
                             Value="{Binding SelectedDay, Mode=TwoWay}" TickPlacement="Both"
                             Width="200" HandlesVisibility="Visible" TickFrequency="1" Grid.Column="1"
                             IsSnapToTickEnabled="True"/>
0
Nazar
Top achievements
Rank 1
answered on 16 Jun 2011, 02:51 PM
And one more thing. If increase Delay and RepeatInterval values it starts to make 2 steps per one click. And if I set Delay to 1000 and RepeatInterval to 2000 it seems to work fine. But still, is it good approach?...
0
Kiril Stanoev
Telerik team
answered on 20 Jun 2011, 07:31 PM
Hello Nazar,

If it does the job in your particular scenario, I see no problem in using those properties. However, I still don't see an issue with the definition of the control you have us. I ran the code at my end and in my oppinion, RadSlider behaves properly. Please take a look at the recorded video and attached sample project. Let me know if I am missing anything. I'd be glad to further assist you.

All the best,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Slider
Asked by
Robert
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Nazar
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or