Ingó Vals
Ingó Vals

Reputation: 4898

Can I toggle expandability of a expander?

Is there any property or state I can set on a expander object that makes it unexpandable but still can be selected?

I'm thinking for example of the last Child in a TreeView where I don't wan't the Expander to have an expander button. But other uses could be if someone doesn't have access to more then the header or something along that line.

Upvotes: 0

Views: 1233

Answers (1)

Andrii
Andrii

Reputation: 2462

The only way I know would be to create custom control template for expander, remove expander button from it and disable expanding.

See WPF Expander: Reversing the icon direction while keeping the content location (ExpandDirection) the same on how to create custom template for expander.

Upvotes: 1

Related Questions