Move to mouse position

3 posts, 1 answers
  1. Wim van der Linden
    Wim van der Linden avatar
    37 posts
    Member since:
    Nov 2008

    Posted 25 May 2009 Link to this post

    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

    1     <telerik:RadSlider  Background="Transparent" Foreground="Transparent" BorderThickness="0" BorderBrush="Transparent"   
    2                                    Margin="0,0,0,0"   
    3                                    x:Name="RadSlider1"   IsMouseWheelEnabled="True"  IsSnapToTickEnabled="False"  TickPlacement="TopLeft"   
    4                                    TickFrequency="1" Value="0"  SmallChange="1"  Minimum="0"  Maximum="500"  Width="12500" 
    5                                    Delay="0">  
    6                <telerik:RadSlider.TickTemplate> 
    7                         <DataTemplate> 
    8                               <Canvas Canvas.ZIndex="1" Width="25">  
    9                                             <Rectangle  Canvas.Top="6"   Width="{Binding Converter={StaticResource StyleConverter}, ConverterParameter=Width }" Height="{Binding Converter={StaticResource StyleConverter}, ConverterParameter=Height}" Fill="Black"   /> 
    10                                             <Rectangle Canvas.Top="18"   Width="{Binding Converter={StaticResource StyleConverter}, ConverterParameter=Width }" Height="{Binding Converter={StaticResource StyleConverter}, ConverterParameter=Height}" Fill="Black"   /> 
    11  
    12                                             <Canvas Canvas.Top="8" Canvas.Left="-10" Canvas.ZIndex="1">  
    13                                                 <TextBlock  Text="{Binding Converter={StaticResource TODTickLabelConverter}}" FontSize="8" Foreground="Black" /> 
    14                                             </Canvas> 
    15                                </Canvas> 
    17                          </DataTemplate> 
    19               </telerik:RadSlider.TickTemplate> 
    20      </telerik:RadSlider> 
  2. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 26 May 2009 Link to this post

    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.
  3. DevCraft banner
  4. Wim van der Linden
    Wim van der Linden avatar
    37 posts
    Member since:
    Nov 2008

    Posted 26 May 2009 Link to this post

    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
Back to Top