I'm not sure how to describe this. I have a RadSlider that controls a dynamic range adjustment of an image. I've bound the slider selection values to a property named "DraSelection". As the user moves the max slider button and I get calls to DraSelection::set, I continually update the DRA of the image. This can be expensive computationally, but I need it to updates to happen immediately to the image so I have to set DeferredDraggingEnabled to "false".
As a result, sometimes the DRA processing just can't keep up with the user moving the slider. I would be OK with that (it will catch up when the user stops moving) but I've found that when this happens -- when we get into these laggy situations -- RadSlider starts sending me bizarre calls to DraSelection::set as if it's trying to "predict" where the slider is going to be rather than telling me where it actually is.
To illustrate, it happens like this:
1. Picture a range of, say, 0 to 100 for the slider
2. Min slider is at 0, Max is at 100
3. User grabs the max slider button and start moving the max down. 99, 98, etc
4. With each move, i get a DraSelection::set from Telerik.
5. I call some expensive function (call it "SetDra"). It is expensive enough to let the user move the slider many ticks before it returns
6. Eventually, the user has moved the max button quite a bit, say, down to... 75. without the SetDra() function having returned.
7. Now RadSlider suddenly gives me a DraSelection::set call and the max value is something ridiculously low, like... 40.
Note that at no point did the user ever actually move the slider to 40 or anywhere near it. But RadSlider gave me an update as if he did. So the slider jumped all the way to the left (40) while the mouse cursor was still sitting to the right at 75. It is as if RadSlider "predicted" it was going to be at 40 by the next time it could get something done so it just "faked" it.
Note also that the user still has the mouse button down. He hasn't even lifted it up at this point. He's just paused. So technically he is still dragging that slider. And if he then (after a delay) moves it just a tiny bit -- like from 75 to 76, then the max slider jumps all the way back from 40 to 76 and I get another DraSelection::set with a max of 76 again.
I can't have this behavior in a finished product but I need immediate processing. Is there any way to turn off this behavior without setting DeferredDraggingEnabled to "true"
I should note that I am using version 2012.3.1129.40 of Telerik. I am not permitted to update to a more recent version now but will as soon as I can. Sso if this is some sort of bug that has been fixed, is there any other workaround besides deferred dragging?.
Or perhaps I'm doing something wrong. Here's my XAML (minus some irrelevant properties)
<tk:RadSlider x:Name="DraSlider"
VerticalAlignment="Top"
HorizontalAlignment="Stretch"
Ticks="0"
Minimum="{Binding Path=DraRangeMin}"
Maximum="{Binding Path=DraRangeMax}"
Visibility="{Binding Path=Ready, Converter={StaticResource CvtBoolToVis}}"
IsEnabled="{Binding Path=CanUpdateDraSliders}"
Selection="{Binding Path=DraSelection, Mode=TwoWay}"
SelectionChanged="DraSlider_OnSelectionChanged"
StepAction="MoveRange"
IsSelectionRangeEnabled="True">
As a result, sometimes the DRA processing just can't keep up with the user moving the slider. I would be OK with that (it will catch up when the user stops moving) but I've found that when this happens -- when we get into these laggy situations -- RadSlider starts sending me bizarre calls to DraSelection::set as if it's trying to "predict" where the slider is going to be rather than telling me where it actually is.
To illustrate, it happens like this:
1. Picture a range of, say, 0 to 100 for the slider
2. Min slider is at 0, Max is at 100
3. User grabs the max slider button and start moving the max down. 99, 98, etc
4. With each move, i get a DraSelection::set from Telerik.
5. I call some expensive function (call it "SetDra"). It is expensive enough to let the user move the slider many ticks before it returns
6. Eventually, the user has moved the max button quite a bit, say, down to... 75. without the SetDra() function having returned.
7. Now RadSlider suddenly gives me a DraSelection::set call and the max value is something ridiculously low, like... 40.
Note that at no point did the user ever actually move the slider to 40 or anywhere near it. But RadSlider gave me an update as if he did. So the slider jumped all the way to the left (40) while the mouse cursor was still sitting to the right at 75. It is as if RadSlider "predicted" it was going to be at 40 by the next time it could get something done so it just "faked" it.
Note also that the user still has the mouse button down. He hasn't even lifted it up at this point. He's just paused. So technically he is still dragging that slider. And if he then (after a delay) moves it just a tiny bit -- like from 75 to 76, then the max slider jumps all the way back from 40 to 76 and I get another DraSelection::set with a max of 76 again.
I can't have this behavior in a finished product but I need immediate processing. Is there any way to turn off this behavior without setting DeferredDraggingEnabled to "true"
I should note that I am using version 2012.3.1129.40 of Telerik. I am not permitted to update to a more recent version now but will as soon as I can. Sso if this is some sort of bug that has been fixed, is there any other workaround besides deferred dragging?.
Or perhaps I'm doing something wrong. Here's my XAML (minus some irrelevant properties)
<tk:RadSlider x:Name="DraSlider"
VerticalAlignment="Top"
HorizontalAlignment="Stretch"
Ticks="0"
Minimum="{Binding Path=DraRangeMin}"
Maximum="{Binding Path=DraRangeMax}"
Visibility="{Binding Path=Ready, Converter={StaticResource CvtBoolToVis}}"
IsEnabled="{Binding Path=CanUpdateDraSliders}"
Selection="{Binding Path=DraSelection, Mode=TwoWay}"
SelectionChanged="DraSlider_OnSelectionChanged"
StepAction="MoveRange"
IsSelectionRangeEnabled="True">