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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.