我在Usercontrol中有一个WPf弹出窗口我打开&通过绑定IsOpen属性关闭。我面临的问题是,即使我使用热键从菜单打开一个新屏幕并且它显示在新屏幕的顶部,弹出窗口也不会关闭。我试图设置StaysOpen =“False”但它不起作用。
Popup IsOpen =“{Binding RelativeSource = {RelativeSource TemplatedParent},Path = IsPopupOpen,Mode = OneWay,UpdateSourceTrigger = PropertyChanged}” HorizontalAlignment =“Center”VerticalAlignment =“Center”PopupAnimation =“Fade”HorizontalOffset =“30”StaysOpen =“False”>
谢谢,