I have a WPF window which has a ItemsControl which contains list of User controls. Each user control has a button and a list box. On the button i have a context menu which lists some option.
When i ran the WPF window directly the context menu works perfectly. Now i have integrated the WPF form in a excel add in. on click of a button in addin the window show up. This works fine
But when the window is called from addin and i right click the button to see the context menu options, it comes and immediately disappears.
Any idea what i am missing here ?
- Shankar
I had an Excel-Add-In using WPF showing the behavior you describe. In my case it was a consecutive error of this framework bug:
One of the recommended workarounds worked for me:
来源:https://stackoverflow.com/questions/7694125/wpf-window-invoked-from-excel-context-menu-shows-and-disappears-immediately