RadSlider ValueChanged fired repeatedly

5 posts, 0 answers
  1. Robert
    Robert avatar
    1 posts
    Member since:
    Aug 2010

    Posted 22 Feb 2011 Link to this post


    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. 

           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?

  2. Petar Mladenov
    Petar Mladenov avatar
    2991 posts

    Posted 25 Feb 2011 Link to this post

    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!
  3. Nazar
    Nazar avatar
    8 posts
    Member since:
    May 2011

    Posted 16 Jun 2011 Link to this post

    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"
    <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"
  4. Nazar
    Nazar avatar
    8 posts
    Member since:
    May 2011

    Posted 16 Jun 2011 Link to this post

    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?...
  5. Kiril Stanoev
    Kiril Stanoev avatar
    1512 posts

    Posted 20 Jun 2011 Link to this post

    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
Back to Top