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

Change Expander ToggleButton Image

3 Answers 634 Views
Expander
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 16 Sep 2010, 06:29 PM
Hi,

Is there a way to change the Up/Down arrow used by  the RadExpander to different images/icons.  I would like to use different .png files for Expand and Collapse state.

Thanks,

Mike

3 Answers, 1 is accepted

Sort by
0
Viktor Tsvetkov
Telerik team
answered on 17 Sep 2010, 04:04 PM
Hi Michael,

In order to change the default arrow you should edit the template of the RadExpander in Blend, find the Path element named arrow and replace it with your custom Path element.

Best wishes,
Viktor Tsvetkov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
mike okon
Top achievements
Rank 1
answered on 10 Apr 2013, 10:47 PM
Hi

Is there an example of just having a 2 state image (On and Off) for the button? I don't need all the arrows and animation. I want my own images to display the button. I have tried to remove the arrows in the template but only managed to succeed in removing the functionality as well.

regards
mike
0
Pavel R. Pavlov
Telerik team
answered on 12 Apr 2013, 01:37 PM
Hi mike,

In order to achieve your goal you have to edit the default template of the RadExpander control. For more information you can take a look at this article. When you extract it you will be able to find a Path control named "arrow". In your case you will have to replace it with an Image control. Furthermore, you will have to customize the VisualStates that change the control named "arrow". In your case you will have to change the Image.Source property in the different states.

For your convenience I exacted and edited the default template in the attached project. Please note that I have replaced the Path control with an Ellipse for simplicity.

I hope this works in your scenario.

Regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Expander
Asked by
Michael
Top achievements
Rank 1
Answers by
Viktor Tsvetkov
Telerik team
mike okon
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or