Steps to reproduce:
1) Subclass RadSlider as pasted in the code below, and put that control in a window as illustrated below.
2) Set a trace point in "OnSelectionRangeChanged" and output newValue.SelectionStart
3) Once the app is loaded expand the range selection so you can click and drag the selection
4) Click and drag the selection from right to left and observer SelectionStart, the value is not consistently 0.0 when you drag the selection to the beginning of the range unless you change the range itself (expand it).
Code:
Subclassed RadSlider
XAML
1) Subclass RadSlider as pasted in the code below, and put that control in a window as illustrated below.
2) Set a trace point in "OnSelectionRangeChanged" and output newValue.SelectionStart
3) Once the app is loaded expand the range selection so you can click and drag the selection
4) Click and drag the selection from right to left and observer SelectionStart, the value is not consistently 0.0 when you drag the selection to the beginning of the range unless you change the range itself (expand it).
Code:
Subclassed RadSlider
public
class
JSlider : RadSlider
{
public
JSlider()
{
IsSelectionRangeEnabled =
true
;
}
/// <summary>
/// Raises the <see cref="E:System.Windows.FrameworkElement.SizeChanged"/> event, using the specified information as part of the eventual event data.
/// </summary>
/// <param name="sizeInfo">Details of the old and new size involved in the change.</param>
protected
override
void
OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
base
.OnRenderSizeChanged(sizeInfo);
// setup the slider with the correct maximum based on our current available width
Minimum = 0;
Maximum = ActualWidth;
}
protected
override
void
OnSelectionRangeChanged(SelectionRangeChangedEventArgs oldValue, SelectionRangeChangedEventArgs newValue)
{
base
.OnSelectionRangeChanged(oldValue, newValue);
}
}
XAML
<
Grid
>
<
DockPanel
>
<
WpfApplication15:JSlider
DockPanel.Dock
=
"Bottom"
Height
=
"200"
/>
</
DockPanel
>
</
Grid
>