Search code examples
c#expander

Expander IsExpanded method


I want to know if an expander is expanded or not. Something like this:

Boolean getExpanderStatus= myExpander.isExpanded()

But this does not work as "Non -invocable 'System.Windows.Controls.Expander.IsExpanded' cannot be used like a method.

I'm sure there'll be an annoyingly simple answer to this.

Thanks in Advance.


Solution

  • IsExpanded is a property, not a method.

    Properties behave like variables; they don't use parentheses.