Child wpf window above parent window
I have WPF application with main window. I want to create child WPF window which always must be above ONLY parent window. If I set TopMost property for new window then window开发者_开发知识库 is above ALL nonTopMost windows on desktop. It's not what I want.
Set the Owner property of the child window so that it refers to the parent window.
child.Owner = parent;
Depending on the nature of the window, I often use a "Fake" window that is really just a layer in the parent along with a partailly transparent grey layer between that makes the parent look ghosted while the child is active. You can then keep the child window set to collapsed until it is needed.
精彩评论