Live Chat Icon For mobile
Live Chat Icon

How do I make the Expander button to be justified to the right, rather than the left which is the default ?

Platform: WPF| Category: Expander

If you require justifying the Expander button to the right, you need to set the FlowDirection property to RightToLeft.

Note: If you set the FlowDirection to RightToLeft, the content of the expander will also be moved to RightToLeft justification. In order to avoid this, you can set the flow direction to expander content. This can be done with the following code snippets,


<Expander FlowDirection="RightToLeft">
                <TextBlock Text="Expander header content" Background="AliceBlue"
                           AncestorType={x:Type Expander}},
            <Grid FlowDirection="LeftToRight">
                <TextBlock Background="Gray" Text="Expander body content"/>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.