tags:

views:

32

answers:

1

Hello All,

I've created a WPF Popup with StaysOpen = "False". Nonetheless, it stays open if I click outside the Popup but still within the app's main window. (If I click outside the main window, then the Popup will properly close.)

For this Popup, I have tried both Placement = "MousePoint" and Placement = "Mouse".

I do believe that the focus is leaving the Popup when I click outside of it. I say this because I can click on buttons in my main window, and their handlers run. But all the while, the Popup stays stubbornly visible. Since the focus leaves the Popup, it should close. But it does not.

Can anybody fathom a reason why my Popup is not closing even though I set StaysOpen = "False"?

Thanks, Dave

A: 

Have you bound IsOpen to anything? If so, have you bound it TwoWay?

Can you post a simple repro of the issue?

HTH,
Kent

Kent Boogaart
IsOpen is not databound. I set it to "False" in xaml, and I set it to "True" in code in the handler for an "About" button. I do this expecting that my "About" Popup will close when the user clicks outside of it. But as I said, it does not.So far, I've been unable to reproduce the issue in a sample app - the Popup works as expected.
Dave
Sounds like a process of elimination then, until you figure out what it is about your app that is causing it to stay open. Good luck!
Kent Boogaart