Expander.Expanded Event

Definition

Occurs when the content window of an Expander control opens to display both its header and content.

C#
public event System.Windows.RoutedEventHandler Expanded;

Event Type

Examples

The following example shows how to specify the event handler for the Expanded event.

C#
yourExpander.Expanded += new RoutedEventHandler(expanderHasExpanded);
XAML
<Expander Name ="yourExpander" Expanded="expanderHasExpanded" 
          Header ="expanderTitle" Content="expanderContent"/>

The following example shows how to define the event handler.

C#
private void expanderHasExpanded(object sender, RoutedEventArgs args)
{
    //Do something when the Expander control expands
}

Remarks

The Expanded event occurs when the IsExpanded property changes from false to true.

Routed Event Information

Item Value
Identifier field ExpandedEvent
Routing strategy Bubbling
Delegate RoutedEventHandler

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also