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

Change Expander button Image

3 Answers 611 Views
Expander
This is a migrated thread and some comments may be shown as answers.
Mikel
Top achievements
Rank 1
Mikel asked on 11 Apr 2016, 03:24 PM

Hi!

 

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

 

Thanks!

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 14 Apr 2016, 02:30 PM
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.
0
Mikel
Top achievements
Rank 1
answered on 14 Apr 2016, 03:48 PM

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!

0
Martin
Telerik team
answered on 15 Apr 2016, 11:10 AM
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.
Tags
Expander
Asked by
Mikel
Top achievements
Rank 1
Answers by
Martin
Telerik team
Mikel
Top achievements
Rank 1
Share this question
or