Undoubtedly this is my own ignorance in glorious action but...
-
I am new to C# and WPF. I have a legacy bag of C++ code and dialogs. C# has this neat facility called "HwndHost" that lets you put legacy, message pump driven, windows inside a border control. My dialog is successfully hosted and running. The XAML also has a button with an accelerator. In my native dialog if I have an edit box and I try to type the letter of the accelerator it causes the accelerator to fire and the letter to be stolen from the edit box that had the focus. I can't begin to know what the heck is wrong and I suspect it has to do with weird and not so wonderful way that events are handled. My solution was to remove the accelerator or tell the user to paste in the letter 'o' when they needed it.
-
I am new to C# and WPF. I have a legacy bag of C++ code and dialogs. C# has this neat facility called "HwndHost" that lets you put legacy, message pump driven, windows inside a border control. My dialog is successfully hosted and running. The XAML also has a button with an accelerator. In my native dialog if I have an edit box and I try to type the letter of the accelerator it causes the accelerator to fire and the letter to be stolen from the edit box that had the focus. I can't begin to know what the heck is wrong and I suspect it has to do with weird and not so wonderful way that events are handled. My solution was to remove the accelerator or tell the user to paste in the letter 'o' when they needed it.
Maybe this helps: http://stackoverflow.com/questions/5564158/wpf-shortcuts-are-activating-when-typing-in-hwndhost-parented-rich-edit-control[^] I don't have any experience with it personally, I just found that with a quick Google search. :-P
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
-
Maybe this helps: http://stackoverflow.com/questions/5564158/wpf-shortcuts-are-activating-when-typing-in-hwndhost-parented-rich-edit-control[^] I don't have any experience with it personally, I just found that with a quick Google search. :-P
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
Thank you! That is indeed timely information. :)
-
Thank you! That is indeed timely information. :)
-
You're very welcome. Did it provide a feasible solution? :-D
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
As a matter of fact it did. I had to explicitly implement the OnMnemonic function to trap the accelerator and send it along as the character that it was supposed to be. Pretty clunky. I'm surprised that the interoperability is not better but I get that is what happens when HWND based dialogs are mixed with XAML based dialogs.