VSTO WPF ContextMenu.MenuItem Click outside a TaskPane not raised

孤街浪徒 提交于 2019-12-01 04:08:31

问题


The Click Event form a Context Menu Item is not raised when the cursor is outside the taskpane. I have no idea how get it working. 90% of the time, the click is outside the task Pane.

When the context menu is openned, the sub menus are often displayed outside the task pane (see picture below). In such cases, the click event from the context Menu is not raised.

I have absolutly no idea how to make this work.

Any ideas?


回答1:


The Custom Task Pane has focus problems with WPF Context Menus. Look here.

I have the same problems. Actually I use one of the recommended workarounds (Dispatcher Frame). Is is working, but I am not very happy with this clumsy solution.



来源:https://stackoverflow.com/questions/8449745/vsto-wpf-contextmenu-menuitem-click-outside-a-taskpane-not-raised

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!