且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

System.Windows.Controls.WebBrowser的焦点问题

更新时间:2023-12-06 14:57:46

好吧,我可以解释一下您遇到的情况:正常的WPF/hwnd互操作.将hwnds与WPF一起使用时,此行为非常标准.就定位和显示而言,这两种技术之间的互操作有效,但是不幸的是,这些焦点问题一直存在,并且没有人设法解决它们.我认为这就是为什么WPF/hwnd互操作不能在生产应用程序中使用的原因.

希望Microsoft的某人能够提出一种解决方法,可以在这种情况下为您提供帮助.不幸的是我不能.
Well, I can explain what you're experiencing: normal WPF/hwnd interop. This behaviour is pretty standard when using hwnds together with WPF. The interop between the two technologies works as far as positioning and display is concerned, but unfortunately these focus issues have always existed and nobody has managed to fix them. This is why, in my opinion, WPF/hwnd interop cannot be used in production applications.

Hopefully someone from Microsoft will be able to suggest a workaround that might help you in this individual case. Unfortunately I can't.