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
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.