简体   繁体   English

如何在不关闭WPF C#中的弹出窗口的情况下移动焦点窗口?

[英]How to move focus window without closing popup window in WPF C#?

I need to move focus from popup window to parent window without closing popup window. 我需要将焦点从弹出窗口移动到父窗口而不关闭弹出窗口。 For example Find and replace dialog-box behavior in Excel. 例如,在Excel中查找和替换对话框行为。

how to achieve this in WPF C# coding. 如何在WPF C#编码中实现这一点。

Call .Show() instead of .ShowDialog() when you displaying your popup. 显示弹出窗口时,调用.Show()而不是.ShowDialog()。 If you want to keep it on top - set popup window 'TopMost' property to true. 如果要保留在顶部,请将弹出窗口的“ TopMost”属性设置为true。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM