Working WPF Window into a WinForms (VS 2005) Project
Posted on 2011-03-02
I know this is weird and not an ideal approach but stick with me here. :)
So I have a project that I made in VS 2005. In the newest build I want to integrate a WPF window with it, so I designed the window in VS 2008 and compiled it as a library. I then included that lib in the VS 2005 project, along with PresentationCore, PresentationFramework, and WindowsBase. I can call the WPF window from the class library and the code behind the buttons on the window works, but user's can't type in the textboxes.
The controls on the WPF window respond to mouse events. They highlight on mouseover. As mentioned, if a user clicks the button on the window, it runs the code behind it as expected. Clicking on a textbox on the WPF window puts the focus on the textbox and the cursor is displayed, but no text appears to enter the textbox when typing.
Any ideas how to make that work?
EDIT: Another observation -- I can cut/copy from and paste into the textbox. But it still doesn't allow the typing of any characters. When I paste text into the textbox, I can also backspace/delete characters in it. The arrow keys do not allow me to move the cursor forward or backward through any text that I've pasted into the box.