Capture text in wpf textbox Excel 2010 vsto
-
Friday, March 23, 2012 1:29 PM
Hello
I came across a really strange issue while developing a vsto Excel add in for MS Office 2010.
Basically on click of a ribbon button i display a custom wpf window which allows a user to change a number of setting by typing into textboxes on this form.But when i click on the textbox and start typing the text get's entered into Excel, in the A1 cell.
This is extremely frustrating, has anyone encountered an issue like this before and if so could you please advice a possible work around?
Type of add in - VSTO Excel 2010
Programming Language - C# 4.0,.NET 4.0
Visual Studio 2010
Windows forms technology = WPF
All Replies
-
Monday, March 26, 2012 6:26 AMModerator
Hi Denys,
Thanks for posting in the MSDN Forum.
Would you please clarify following sentence? I think I can't catch your goal. It will make more sense if you can clarify it via some snippet.
Basically on click of a ribbon button i display a custom wpf window which allows a user to change a number of setting by typing into textboxes on this form.But when i click on the textbox and start typing the text get's entered into Excel, in the A1 cell.
Have a good day,
Tom
Tom Xu [MSFT]
MSDN Community Support | Feedback to us
-
Friday, April 13, 2012 3:45 AMModerator
Hi Denys
I walk through the scenario you mentioned, but could not reproduce what you see:
- Excel 2010 addin C#, .NET 40;
- Add Ribbon, add a ribbon button;
- Add a Winform to project,
- Add WPF user control to project, with textbox;
- Add a ElementHost to Winform, host the usercontrol just created;
- In event handler of ribbon button, show the Winform dialog,
Launch Excel in debug mode, I enter text into the dialogbox, and it works as expected. This is FYI. You may consider this way in your solution.
best regards,
Forrest Guo | MSDN Community Support | Feedback to manager

