tags:

views:

35

answers:

1

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.

+1  A: 

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

See http://stackoverflow.com/questions/3142407/wpf-expander-reversing-the-icon-direction-while-keeping-the-content-location-ex/3143161#3143161 on how to create custom template for expander.

Andrii V