I have a WPF application built into the Microsoft Outlook 2003 window. Everything works fine, but none of my TextBox controls accepts the backspace key. I did some research, and the problem only exists when my window is a child of the perspective window, and not if it is another window (I entered it in firefox and it works fine, and if I put my wpf UserControl in the dialog box it also works). This seems to be the opposite problem that people are reporting (the text field accepts only delete / arrow keys / etc.), and this thread was somewhat informative (although it did not fix my problem): WPF TextBox did not accept input when in ElementHost in window forms
Here is my setup: I create a WPF UserControl, which I then put in ElementHost. I put this host in a Windows Forms UserControl, which is placed in another Forms UserControl, which is placed in NativeWindow (I tried to remove part of the UserControl wrapper, but without effect). This native window then becomes a child of the Outlook window and is placed where I need it to be in Outlook.
Does anyone have any ideas? Maybe I need to handle Windows messages differently? I did some research and found out that Outlook receives the WM_COMMAND message when I press the backspace key, but not when I do nothing else. Maybe he interprets the backspace key as a menu accelerator or something like that?
Thanks.
source share