Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Popup Never Closes

Tags:

wpf

popup

WPF is really getting me out of my nerves here. I configured a popup with some complex content (grid, buttons etc..). I set its StaysOpen property to False and IsOpen to True on a textbox MouseDown preview event.

Ths thing is that it opens but never closes when clicking anywhere outside the window.

Any suggestions?

Thanks!

UPDATE:

My popup has buttons inside. When I click one of those, the popup closes when I click outside of it. Is some weird stuff happening to the events routing?

like image 445
Luis Aguilar Avatar asked Sep 29 '11 21:09

Luis Aguilar


1 Answers

Looks like the popup won't close if opened by any other control event. I just binded the IsOpen property to the IsChecked property of a ToggleButton to simulate a combobox.

Thanks for all your answers.

like image 175
Luis Aguilar Avatar answered Oct 14 '22 00:10

Luis Aguilar