This is a migrated thread and some comments may be shown as answers.

Move to mouse position

2 Answers 85 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Wim van der Linden
Top achievements
Rank 1
Wim van der Linden asked on 25 May 2009, 12:09 PM
Hello,

in my application i'm using a slider within a scrollviewer.
since the slider is much bigger then my screen.

now the behaviour I want is that the selection arrow jumps to the value on the slider where I click.
In the mouseleftbuttondown event I can't find any parameter that indicates the clicked value or something like that.
how can achive the wanted behaviour?

thank you for your time,

Wim

p.s. this is my sliders xaml in case you wanna know

    <telerik:RadSlider  Background="Transparent" Foreground="Transparent" BorderThickness="0" BorderBrush="Transparent"   
                                   Margin="0,0,0,0"   
                                   x:Name="RadSlider1"   IsMouseWheelEnabled="True"  IsSnapToTickEnabled="False"  TickPlacement="TopLeft"   
                                   TickFrequency="1" Value="0"  SmallChange="1"  Minimum="0"  Maximum="500"  Width="12500" 
                                   Delay="0">  
               <telerik:RadSlider.TickTemplate> 
                        <DataTemplate> 
                              <Canvas Canvas.ZIndex="1" Width="25">  
                                            <Rectangle  Canvas.Top="6"   Width="{Binding Converter={StaticResource StyleConverter}, ConverterParameter=Width }" Height="{Binding Converter={StaticResource StyleConverter}, ConverterParameter=Height}" Fill="Black"   /> 
                                            <Rectangle Canvas.Top="18"   Width="{Binding Converter={StaticResource StyleConverter}, ConverterParameter=Width }" Height="{Binding Converter={StaticResource StyleConverter}, ConverterParameter=Height}" Fill="Black"   /> 
 
                                            <Canvas Canvas.Top="8" Canvas.Left="-10" Canvas.ZIndex="1">  
                                                <TextBlock  Text="{Binding Converter={StaticResource TODTickLabelConverter}}" FontSize="8" Foreground="Black" /> 
                                            </Canvas> 
                               </Canvas> 
                         </DataTemplate> 
              </telerik:RadSlider.TickTemplate> 
     </telerik:RadSlider> 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 26 May 2009, 06:48 AM
Hello Wim,

You have to set  the following property of of  RadSlider:  IsMoveToPointEnabled="True".
You can see a sample at the attached file. Let me know if you have further questions.

Best wishes,
Dimitrina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Wim van der Linden
Top achievements
Rank 1
answered on 26 May 2009, 07:51 AM
Dear Dimitrina,

reading the answer the kinda does make sense, somehow overlooked the property.
thank you for the answer, the level of support is just great!

kind regards,
Wim
Tags
Slider
Asked by
Wim van der Linden
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Wim van der Linden
Top achievements
Rank 1
Share this question
or