Expander.Collapsed Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
event System::Windows::RoutedEventHandler ^ Collapsed;
public event System.Windows.RoutedEventHandler Collapsed;
member this.Collapsed : System.Windows.RoutedEventHandler
Public Custom Event Collapsed As RoutedEventHandler
Event Type
Examples
The following example shows how to specify the event handler for the Collapsed event.
myExpander.Collapsed += new RoutedEventHandler(expanderHasCollapsed);
AddHandler myExpander.Collapsed, AddressOf expanderHasCollapsed
<Expander Name ="myExpander" Collapsed="expanderHasCollapsed"
Header ="expanderTitle" Content="expanderContent"/>
The following example shows how to define the event handler.
private void expanderHasCollapsed(object sender, RoutedEventArgs args)
{
//Do something when the Expander control collapses
}
Private Sub expanderHasCollapsed(ByVal sender As Object, ByVal args As RoutedEventArgs)
'Do something when the Expander control collapses
End Sub
Remarks
The Collapsed event occurs when the IsExpanded property changes from true
to false
.
Routed Event Information
Item | Value |
---|---|
Identifier field | CollapsedEvent |
Routing strategy | Bubbling |
Delegate | RoutedEventHandler |
Applies to
See also
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.