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

Change TimePicker Icon

1 Answer 96 Views
TimePicker
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 14 Dec 2011, 06:39 PM
Is there an easy way to change the icon on the TimePicker control?  I looked and couldn't find a quick property to set (e.g. IconPath="MyImage.png" or something).

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 15 Dec 2011, 08:50 AM
Hello Dean,

RadDateTimePicker does not have an attached property for changing the icon. The control template must be modified in order to implement a different icon. If you generate the template, you will find the following ContentControl, which is responsible for the icon:

<ContentControl x:Name="DropDownIcon" Background="White" Foreground="Black" IsTabStop="False">  
    <ContentControl.Template>
        <ControlTemplate TargetType="{x:Type ContentControl}">
                                                <Grid>
                                                    <Path x:Name="CalendarIconBackground" Data="M0,0.5L7,0.5 M0,2.5L7,2.5 M0,4.5L7,4.5 M0,6.5L7,6.5 M0.5,0L0.5,7 M2.5,0L2.5,7 M4.5,0L4.5,7 M6.5,0L6.5,7" Height="7" Margin="4,5,4,4" Stroke="{TemplateBinding Background}" Width="7"/>
                                                    <Path x:Name="CalendarIconForeground" Data="M0,0.5L7,0.5 M0,2.5L7,2.5 M0,4.5L7,4.5 M0,6.5L7,6.5 M0.5,0L0.5,7 M2.5,0L2.5,7 M4.5,0L4.5,7 M6.5,0L6.5,7" Height="7" Margin="4,4,4,5" Stroke="{TemplateBinding Foreground}" Width="7"/>
                                                </Grid>
                                            </ControlTemplate>
                                        </ContentControl.Template>
                                    </ContentControl>

I hope this will be helpful.

Best wishes,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
TimePicker
Asked by
Dean
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or