I have a slider which I want the thumb moves to exact position when click on anywhere on the slider track and moves slower when I press Shift key and drag the thumb. I know how to detect when the shift key is pressed but I don't know how to slow down the thumb. Any help would be appreciated!
Here is the xaml code:
<Grid>
<Slider x:Name="m_Slider" IsMoveToPointEnabled="True" Orientation="Vertical"
Height="200" Width="30" Minimum="0" Maximum="20" HorizontalAlignment="Center"
Thumb.DragStarted="Slider_ShiftDrag"/>
</Grid>
and here is the code-behind:
void Slider_ShiftDrag(object sender, DragStartedEventArgs e)
{
if (e != null && (Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift)))
{
//What should I do here?
}
}