views:

262

answers:

1

I'm developing a Microsoft Word TaskPane containing a WPF ElementHost. The hosted WPF uses a Popup that is intended to behave as a ComboBox's does. I believe you can reproduce my problem like this:

popup.IsOpen = true;
popup.StaysOpen = false;
Mouse.Capture(ancestor_of_popup, CaptureMode.SubTree);

When a region of the Popup lies outside the bounds of the TaskPane, click the mouse in that region. The entire TaskPane loses keyboard focus to Word's main window, but retains mouse capture. At this point, you can use the Popup with a mouse while typing on the keyboard edits your document!

If the TaskPane loses keyboard focus then the Popup should close, but then any control in the region of a Popup that lies outside the bounds of the TaskPane becomes unusable. Any ideas?

A: 

any news on this one? :)

komplikator
work-around: position and size the popup to keep it within the bounds of the taskpane.
Joshua Tacoma