Popup always stays on top

2020-01-31 03:38发布

I've WPF application which has one Main window on which I'm opening a Popup window. The problem I'm facing is the Popup window always stays on top. If I open some other application(any windows application) the main window goes into background but the Popup windows remain on top.However if I minimize the Mainwindow the Popup also minimizes.

Below image shows the problem. The PopUp window is appearing on top of Notepad application

Please help on overcoming this issue.

Update:

I am opening the Popup as below

 myPopup.IsOpen = true;

标签: c# wpf
7条回答
男人必须洒脱
2楼-- · 2020-01-31 04:11

Check the Window.Topmost property whitch is indicates that window should be always on top.

PopupWindow wnd = new PopupWindow();
wnd.ShowDialog();
查看更多
登录 后发表回答