user947737
user947737

Reputation: 364

Which event fires when you click outside an editable ComboBox and cause it to close?

It doesn't seem to be LostFocus. That event fires sometimes, but not every time you perform the action. Any Clues?

Upvotes: 0

Views: 428

Answers (1)

Pedro Gaspar
Pedro Gaspar

Reputation: 878

If you are refering to the dropdown part closing when you say "and cause it do close", the answer would be the ComboBox.DropDownClosed event.

In my tests the one that occurs right before that is UIElement.MouseLeave event. Although the documentation says this event "occurs when the mouse pointer leaves the bounds of this element" (and it really does, when the dropdown part isn't open), this event is fired when you click outside the ComboBox with a dropdown opened, and just after that you get the ComboBox.DropDownClosed event.

Upvotes: 1

Related Questions