Recently I have this bug inherited from my good intern that WPF <Popup/>will always be TOP_MOST in terms of z-index. The bug scenario is thatwhen you have another application (eg. notepad.exe) going on top of myWPF application (with Popup launched), Popup will be top most eventhough notepad appears on top of my app. So to fix this, I'm using someold Win32 tricks :-)
[DllImport("user32", EntryPoint = "SetWindowPos")]
private static extern int SetWindowPos(IntPtr hwnd, int hwndInsertAfter, int x, int y, int cx, int cy, int wFlags);
聯(lián)系客服