none
Capture text in wpf textbox Excel 2010 vsto RRS feed

  • Question

  • 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

    Friday, March 23, 2012 1:29 PM

All replies

  • 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

    Monday, March 26, 2012 6:26 AM
    Moderator
  • Hi Denys

    I walk through the scenario you mentioned, but could not reproduce what you see:

    1. Excel 2010 addin C#, .NET 40;
    2. Add Ribbon, add a ribbon button;
    3. Add a Winform to project,
    4. Add WPF user  control to project, with textbox;
    5. Add a ElementHost to Winform, host the usercontrol just created;
    6. 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

    Friday, April 13, 2012 3:45 AM
    Moderator