Changing the Icon in RadDatePicker

4 posts, 1 answers
  1. John-Paul
    John-Paul avatar
    3 posts
    Member since:
    Jan 2016

    Posted 29 Jan Link to this post

    Hi,

    At my work I've been tasked with making the icon bigger(or use a new bigger icon) on the RadDropDownButton inside the RadDatePicker. I've gone about it 2 ways:

    - One was to generate the default template and replace the <contentcontrol> <grid> <path. ...> with the appropriate <image> icon. This results in reverting all the other changes and customizations that were done to the control and it also generates over 1600 lines of code that we don't really want in that xaml file.

    - The second approach involved applying a ScaleTransform to the LayoutTransformation of the RadDropDownButton. The icon's size looks about right but the drop down content(calendar) is also scaled which is not what we wanted.

    I'm basically writing to find out if there is a better way to go about this that either doesn't involve generating the entire default template or affect the size of the content.

     

    Thanks,

    John-Paul Smith

  2. Answer
    Masha
    Admin
    Masha avatar
    355 posts

    Posted 01 Feb Link to this post

    Hi John,

    I'm afraid there is no other way to change the RadDateTimePicker icon except to extract the whole DateTimePicker'с ControlTemplate of the theme you are using. In order to avoid unnecessary xaml I suggest you using implicit styles approach and modify only the ControlTemplate of DateTimePicker.

    I hope this helps.


    Regards,
    Masha
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. John-Paul
    John-Paul avatar
    3 posts
    Member since:
    Jan 2016

    Posted 01 Feb Link to this post

    Thanks Masha, I'll try that out.
  5. John-Paul
    John-Paul avatar
    3 posts
    Member since:
    Jan 2016

    Posted 01 Feb Link to this post

    Yup it worked great. Thanks!
Back to Top