views:

318

answers:

1

How to close the WPF Popup in a WPF Control if clicked outside the Popup area or if the Parent Control is moved ?

I cannot check it from the Parent Control, Everything must be done by the control itself.

A: 
StaysOpen="False"
Djole
Yes this really works, the only problem is that if you move your mouse outside the Popup and scroll.. it stays open :-/
PaN1C_Showt1Me
"When the StaysOpen property is set to true, Popup stays open until it is explicitly closed by setting the IsOpen property to false. When StaysOpen is false, the Popup control intercepts all mouse and keyboard events to determine when one of these events occurs outside the Popup control." that is what I found on MSDN.
Djole