Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TimePicker > Change TimePicker Icon

Not answered Change TimePicker Icon

Feed from this thread
  • Dean avatar

    Posted on Dec 14, 2011 (permalink)

    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).

    Reply

  • Dani Dani admin's avatar

    Posted on Dec 15, 2011 (permalink)

    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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TimePicker > Change TimePicker Icon
Related resources for "Change TimePicker Icon"

WPF TimePicker Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]