Change Expander button Image

4 posts, 0 answers
  1. Mikel
    Mikel avatar
    21 posts
    Member since:
    Feb 2014

    Posted 11 Apr Link to this post

    Hi!

     

    Is there any fast/easy way to change the expander image of RadExpander like expander of TreeListView?

     

    Thanks!

  2. Martin
    Admin
    Martin avatar
    63 posts

    Posted 14 Apr Link to this post

    Hi Mikel,

    The two buttons - the one in the RadExpander and that in the RadListTreeView are from different types, so there is actually no lazy way to do it by reusing the style of the one. The easiest way to achieve your goal is by customizing the HeaderButton in the ControlTemplate of the expander control. Basically, you can remove the circles and their animations and changing the arrow drawing. I am attaching you the whole custom Style for the RadExpander, where I have made changes only to the HeaderButtonStyle, customizing it to the current need. You can build on that if you want to change colors or animations.

    Regards,
    Martin
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Mikel
    Mikel avatar
    21 posts
    Member since:
    Feb 2014

    Posted 14 Apr in reply to Martin Link to this post

    Hi Martin,

     

    Thanks for help.

    I copied it in my resources and I get 2 errors

    <Setter Property="HeaderButtonStyle"> Not recognice "HeaderButtonStyle"

    and

    <Expander:ExpandDirectionToRotationAngleConverter/> Is needed namespace for Expander.

     

    It could be my telerik version is older than yours? Im working with 2015.1.401.40

    Or ,can you say me the path from you take that styles? and I will take it manually.

    I have been finding in "C:\Program Files (x86)\Telerik\UI for WPF Q1 2015\Themes.Implicit\WPF40\ExpressionDark\Themes" but nothing...

     

     

    Regards!

  5. Martin
    Admin
    Martin avatar
    63 posts

    Posted 15 Apr Link to this post

    Hi Mikel,

    Yes, unfortunately the problem now is the version. I was unaware you were using an old one. The property HeaderButtonStyle has been introduced with  Q1 2016 release. My best suggestion is to update to the latest version in order to have easy access to it.

    However, if you want to keep your current version, you will have to customize the ToggleButton in the RadExpander style. You can find the default style under your Telerik controls local installation path - Themes.Implicit folder. The Expander style is located in Telerik.Windows.Controls.xaml style file.

    Regards,
    Martin
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top