I have a wpf Usercontrol, inside i am using a Winforms pdfviewer to display pdf files. Also i have couple of Textboxes to enter document details. finally, A popup which display this user control.
The problem is, when i try to type something in textboxes, ntn is happenning. when i right click on a textbox, i can see context menu with cut, copy and paste options. After googling little bit, i found something like below, Forms.Integration.WindowsFormsHost.EnableWindowsFormsInterop(), I placed this line in loaded event but this is not working. can any one faced simillar issue and have any solutions.
Thanks.
Rey
I have a wpf Usercontrol, inside i am using a Winforms pdfviewer to display
Share
I ran into this problem a while back. As I recall it was a bug having to do with the top level WPF message loop not playing nice with the WinForms message loop.
The solution I used was to change my outermost layer from a WPF Window to a WinForms Form. In other words, I replaced
with
by using a class like this:
This worked around the bug by allowing WinForms to have the outermost message loop.
This change was very easy for me because I already had my top-level content in a separate UserControl (not a Window). If your top-level content is a Window you may need to refactor.