How to expand/collapse a WPF Expander in code? I need to do it in order to initialize a control in it.
Use the IsExpanded
property, set it to true for making the content visible:
myExpander.IsExpanded = true;
Set it to false to collapse the expander.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With