Search code examples
wpfexpander

Can a WPF Expander expand down/left instead of down/right?


When an expander expands down, the content and the header are left-aligned, so it is really expanding down/right. Is it possible to make it expand down/right, so the header and the content are right-aligned?

I don't want to shift the header when it expands. The header should stay where it is.

Thanks


Solution

  • Change the HorizontalAlignment and the HorizontalContentAlignment to Right for down+left expansion.

    To align the header and arrow on the right, you will need to author a new control template for it, or copy the existing one in blend.