I ambuilding an EXCEL 2007 AddIn using VSTO & C#. The project also uses VS2010, .Net 4.0, WPF.

The WPF user control contains ComboBox {Editable, Searchable} s & ElementHost control acts as Host Container for WPF User Control . This element host will be attached to a cell as a cell editor.

On receiving the focus on the cell, user is able to select entries from Dropdown list {the WPF ComBoBox is placed inside UserControl}.

The issue appears when user hits "ENTER" / "TAB" / "ESCAPE" / ""RETURN" Keys from the keyboard. It is expected to have the default EXCEL experience i.e.

ENTER should select the item from the list and list should close and control should be back on the cell {Cell Editor mode should be closed at this time)

TAB should select the item from the list and list should close and control should move to next cell on EXCEL worksheet.

ESCAPE should just cancel user operation /changes.

I am able to trap these keystrokes in ComboBox's KeyUp event but not sure how to simulate the user experience on the EXCEL cells ?
How can send these events back to Excell Application ? I was hoping I could use Application.SendKeys{"{KEYNAME}") syntax once the event is bubbled up to Application.


All suggestions / advise , code samples or URLs are welcome and appreciated.

Thank you.

Thank you.