Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果在弹出区域外单击或父控件被移动,如何关闭WPF PopupWPF 控件?
WPF Popup
我无法从父控件中检查它,一切都必须由控件本身完成。
<Popup x:Name="pop" IsOpen="False" StaysOpen="False">
在 WinRT 和通用应用程序中,您可以使用
IsLightDismissEnabled="真"
单击任何位置时它会自动关闭。