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

Customize Slider control

5 Answers 203 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Jennifer
Top achievements
Rank 1
Jennifer asked on 26 Oct 2011, 02:16 PM
Hi,
I want to customize the slider control to achieve the following

 1.   need to increase the width of tracker
 2.   custom triangle shapes for the handler

am using the following versions
 1.TeleriK       :2010.3.1314.1040
 2.silver light  : 4
 
I have tried   like
            <Setter Property="IncreaseHandleStyle" Value="{StaticResource IncreaseHandleStyle}" />
            <Setter Property="DecreaseHandleStyle" Value="{StaticResource DecreaseHandleStyle}" />

as mentioned in this link "http://demos.telerik.com/silverlight/#Slider/ColorPicker".But it didn't work for me.

I am looking for an immediate reply.Please help me to solve this

Thanks
Jennifer




 

5 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 28 Oct 2011, 04:01 PM
Hello Jennifer,

 Please take a look at the attached project and let me know if it helps. It demonstrates the usage of IncreaseHandleStyle, DecreaseHandleStyle and TrackStyle.

Best wishes,
Kiril Stanoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Jennifer
Top achievements
Rank 1
answered on 29 Oct 2011, 07:06 AM
Hi Kiril,

Thanks for the reply. Please let me know how to change the track color.

Here is the screenshot:

PS: Only consider the img (slidernew)

Thanks
0
Jennifer
Top achievements
Rank 1
answered on 30 Oct 2011, 05:56 AM
.
0
Princy
Top achievements
Rank 2
answered on 01 Nov 2011, 05:37 AM
Hello Jennifer,

Try the following style to achieve your scenario.
XAML:
<UserControl.Resources>
        <Style x:Key="SelectionMiddleThumbStyle1" TargetType="Thumb">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Thumb">
                        <Grid/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
. . . . . . .
 
<telerik:RadSlider  SelectionMiddleThumbStyle="{StaticResource SelectionMiddleThumbStyle1}"  >        
</telerik:RadSlider>

Thanks,
Princy.
0
Petar Mladenov
Telerik team
answered on 02 Nov 2011, 02:53 PM
Hi Princy and Jenny,

 Yes, you can use this Style like so:

    <Style x:Key="SelectionMiddleThumbStyle1" TargetType="Thumb">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid Height="25" Background="Black" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</UserControl.Resources>
<Grid x:Name="LayoutRoot">
    <telerik:RadSlider VerticalAlignment="Center"
                       DecreaseHandleStyle="{StaticResource RepeatButtonStyle2}"
                       HandlesVisibility="Visible"
                       IncreaseHandleStyle="{StaticResource RepeatButtonStyle1}"
                       IsSelectionRangeEnabled="True"
                       SelectionMiddleThumbStyle="{StaticResource SelectionMiddleThumbStyle1}"
                       TrackStyle="{StaticResource ContentControlStyle1}" />
in the project from Kiril and you will achieve the result in the attached picture. Please let us know if this is what you need. Kind regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Slider
Asked by
Jennifer
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Jennifer
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Petar Mladenov
Telerik team
Share this question
or