none
winforms hosting and menu problem RRS feed

  • Question

  • I have a complicated VS 2010 isolated shell project. In this project I have a form designer which has winforms controls, hosted in wpf using WindowsFormsHost. I also use the VS propertygrid.

    When the focus is in the propertygrid and I open the menu using the keyboard, navigation keys work on the propertygrid instead of on the menu - hitting the down arrow causes the selected property to change in the propertygrid, and not the menu item change.

    When the focus is in the form designer, a control is selected and I open the menu using the keyboard, navigation keys work both on the menu and on the selected control - hitting the down arrow causes the selected menu item to change, and the control to move in the designer.

    Tuesday, November 4, 2014 9:36 AM

All replies

  • Hi Yoelp,

    What are you expecting now? Can you give use some screenshots or sample project?

    Have you tried to handle the keyboard event from the "menu" and the "selected control"?


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 5, 2014 5:39 AM
    Moderator
  • Hi,

    I'm sorry if I wasn't clear about the issue. Basically, I have a Visual Studio isolated shell application, with its menus, i.e. the WPF menus of VS.In the application I have some hosted winforms components. When the focus is on an item in the winforms components and I activate the menu using keyboard shortcuts, A drop-down menu is opened. While this drop-down is open, pressing the up/down keys goes to the focused winform component. I do not handle any of the events myself - it is the default behavior of the WPF menu and the winforms control.

    I expect that in the above scenario, while a menu drop-down window is open, all the keyboard events will go to the menu window and not to the winforms control. How can this be fixed?

    Yoel

    Sunday, November 9, 2014 7:01 AM