ComboBox.DropDownClosed Event

 

Occurs when the drop-down list of the combo box closes.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

Public Event DropDownClosed As EventHandler

The following example shows how to assign event handlers and how to handle the DropDownOpened and DropDownClosed events.

<ComboBox Name="cb" StaysOpenOnEdit="true" IsEditable="true" DropDownOpened="OnDropDownOpened" 
        DropDownClosed="OnDropDownClosed">
Private Sub OnDropDownOpened(ByVal Sender As Object, ByVal e As EventArgs)

    If (cb.IsDropDownOpen = True) Then
        cb.Text = "Combo box opened"
    End If

End Sub

Private Sub OnDropDownClosed(ByVal Sender As Object, ByVal e As EventArgs)

    If (cb.IsDropDownOpen = False) Then
        cb.Text = "Combo box closed"
    End If

End Sub

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: