Excel 2007 VSTO Custom Task Pane with WPF Context Menu has focus problems - by Robert Bigelow

Status : 


Sign in
to vote
ID 432998 Comments
Status Active Workarounds
Type Bug Repros 13
Opened 4/16/2009 11:27:43 AM
Access Restriction Public


When a WPF control with a context menu is hosted in a VSTO Custom Task Pane inside of Excel 2007 the context menu has focus problems.  If the context menu extends past the bounds of the Custom Task Pane and the user clicks on it, the context menu does not receive the click and focus is shifted to whatever is behind the context menu item.

Additionally, the context menu will not open again once this happens, unless the user registers a right-click in Excel.
Sign in to post a comment.
Posted by SliverNinja on 5/30/2011 at 12:21 AM
This issue also exists for Outlook if you use a WPF combobox with a long set of list items. If the combobox items go past the border of the application window, you lose focus to the application behind the active window when clicking a combobox selection.

Unsure at this point if you can alter the wpf style to get around this.
Posted by RCRacer on 3/24/2010 at 10:41 AM
This is not just Excel 2007 or WPF, this is affecting me with Word 2007 and Windows Forms controls inside a custom task pane.
On my Custom Task Pane I have a Windows Forms ComboBox control and when 'dropped down' if I select an item that is showing outside the custom task pane, either on the document or outside the entire application itself, my selection is ignored.
Posted by GaryGJohnson on 10/26/2009 at 11:39 AM
I'm experiencing this as well. Unfortunately it also occurs with any WPF component that extends beyond the boundaries of the window in any Office application -- an example of this being the pop-up window of a ComboBox.
Posted by Microsoft on 7/7/2009 at 12:02 PM
Thank you for reporting this issue. Though this issue is under investigation, we will likely not have a fix available in .NET 4.0. We will update this bug again when we are able to fix the issue in a future release. Thanks!
Posted by Microsoft on 4/19/2009 at 11:38 PM
Thanks for reporting this issue. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team