How to integrate a WPF dialog with a WinForms app when a HelpProvider is being used?
I have an existing WinForms app that I'm augmenting with WPF dialogs, using WindowsInteropHelper to handle the parent/child relationship. I've also wired up the ApplicationCommands.Help
command to a handler that does 开发者_StackOverflowthis:
System.Windows.Forms.Help.ShowHelp(null, someUrl, someNavigatorContext);
The parent Form also has a HelpProvider
which handles F1 for the rest of the application.
My problem is that hitting F1 when the WPF dialog is open shows the help system opening twice! It appears that after the static ShowHelp
call, the HelpProvider
for the main Form is getting the event and showing help again.
精彩评论