Muokkaa

Jaa


Expander.Expanded Event

Definition

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

public:
 event System::Windows::RoutedEventHandler ^ Expanded;
public event System.Windows.RoutedEventHandler Expanded;
member this.Expanded : System.Windows.RoutedEventHandler 
Public Custom Event Expanded As RoutedEventHandler 

Event Type

Examples

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

yourExpander.Expanded += new RoutedEventHandler(expanderHasExpanded);
AddHandler yourExpander.Expanded, AddressOf expanderHasExpanded
<Expander Name ="yourExpander" Expanded="expanderHasExpanded" 
          Header ="expanderTitle" Content="expanderContent"/>

The following example shows how to define the event handler.

private void expanderHasExpanded(object sender, RoutedEventArgs args)
{
    //Do something when the Expander control expands
}
Private Sub expanderHasExpanded(ByVal sender As Object, ByVal args As RoutedEventArgs)
    'Do something when the Expander control expands
End Sub

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

See also