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.
当有人点击它时如何关闭弹出窗口?
可以设置IsLightDismissEnabled为true,但当有人点击其他地方而不是弹出窗口本身时,它将关闭弹出窗口。
IsLightDismissEnabled
true
您可以添加事件处理程序Tapped,您可以在其中popup.IsOpen = false;
Tapped
popup.IsOpen = false;
的目的IsLightDismissEnabled是在它失去焦点时关闭弹出窗口。