I ran into a bug with the RadSlider that tripped me up for a few
hours. There's an easy workaround, but I figured that this is the sort
of thing that you'd want to know about so you could fix it.
Synopsis:
When a RadSlider is databound to an object, if the value that is bound to the
Minimum property is set prior to setting the object that is bound to the
Maximum value then your application will terminate with a
StackOverflowException.
What ends up happening, (as far as I can tell), is that internally the
API sees that Minimum has been set to X and so reacts by setting
SelectionStart = Minimum. The API then notices that SelectionStart
> SelectionEnd and so sets SelectionStart to 0. This cycle repeats
until the stack is blown: Selection start goes back to X, then 0, then
X, then 0, then.....
Reproduction case:
I created a simple little WPF app to reproduce this problem.
XAML:
C#:
You can look at your console output to see the problem as it happens.
Workaround:
Setting Maximum prior to Minimum completely avoids this glitch, which is fine for now. Hopefully you folks can patch this up so that others don't need to spend the time scratching their heads and trying to figure out what went horribly wrong with their code. =)