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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With