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
Identifier field | CollapsedEvent |
Routing strategy | Bubbling |
Delegate | RoutedEventHandler |
Applies to
See also
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.