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 wher开发者_StackOverflow社区e 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.
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.
精彩评论