Posted 1 year ago by Peter Schregle
Version: 20.1.4
Avatar

I'm trying to move the expander arrow-icon to the left (instead of the far right as it seems to be by default).

I've seen several other posts and answers (https://www.actiprosoftware.com/community/thread/22805/how-to-override-or-change-expander-move-icon, https://www.actiprosoftware.com/community/thread/21241/changing-expander-style). They all point to the AnimatedExpanderIntro Quick start. However, I cannot find this topic addressed in the sample, nor do I find a custom template for it.

Can you provide me with a little code snippet (preferrable C#, not XAML) that shows how to move the arrow-icon from the right to the left?

Comments (1)

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Peter,

I believe your company has a WPF Studio license and can download the default styles/templates from our web site.  The best thing to do would be to download that from your organization account page (via the blue Actions button in the licenses list) and then go to the Shared folder and look for Expander.xaml.  That will have the default styles/templates in it. 

You'd want to clone the "ExpanderHeaderStyle" Style, flip the Grid columns around so the glyph presenter UI with Auto column width is the first column, and put the cloned Style in your App.Resources with a new x:Key.  Then set your expander's attached "themes:HeaderedControlThemeProperties.HeaderStyle" property to a StaticReference with that new keyed Style.  That shoud do it and would be the fastest way to go.

Doing a similar thing in C# instead would be a lot trickier.  You'd have to walk the visual tree, look for the ToggleButton that is your expander's header.  Then go further down a couple levels and look for the Grid in that with the "*" and "Auto" column widths.  Flip those column width around.  Then change the two children (which are PixelSnapper elements in our current template) so their Grid.Columns are flipped too.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.