Change TimePicker Icon

2 posts, 0 answers
  1. Dean
    Dean avatar
    23 posts
    Member since:
    Nov 2009

    Posted 14 Dec 2011 Link to this post

    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).
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 15 Dec 2011 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top