开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜