Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am facing focus issue with the WinformHost control. I have a webbrowser control hosting Microsoft office documents using WinForm usercontrol. I need to display this WinForm control using WPF window as WebBrowser in WPF is having limited capabilities compared with WinForm's one (ours is WPF application). I am using WindowsFormsHost control in WPF for this. Everything works fine until focus shifts to some other window (for eg. ALT + TAB). While returning back to the application, I could see the Focus is lost (that is obvious) but I couldn't get focus back onto the office documents again. Nothing happens while clicking the document being hosted in the webbrowser now. Please let me know if anyone has any workaround/fix for this.

Thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 5-Aug-13 18:09pm    
Why? WPF has its own System.Windows.Controls.WebBrowser.
—SA
Coder.86 5-Aug-13 18:31pm    
I can't use WPF WebBrowser control as it doesn't provide interfaces to talk to the COM components (Interop Excel, Word) which I require for attaching ActiveX documents (like MS Office documents).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900