IsExpanded Property
Collapse the table of content
Expand the table of content

Expander.IsExpanded Property


Gets or sets whether the Expander content window is visible.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public bool IsExpanded { get; set; }

Property Value

Type: System.Boolean

true if the content window is expanded; otherwise, false. The default is false.

The following example shows how to set the IsExpanded property.

myExpanderIsExpanded.IsExpanded = true;
<Expander Name ="myExpanderIsExpanded" IsExpanded="True"  
          Header ="expanderTitle" Content="expanderContent"/>

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft