none
wpf, excel, losing focus RRS feed

  • Question

  • Hi,

     

    this is quite strange problem that has been discovered. Our application makes use of AvalonDocks.

     

    We have a window which contains several "docked" windows. 

    I then display a another small user control in a seperate window(outside of the main window). This is all done using avalondocks.

    If the main window (and only if) contains an excel worksheet. and i try to select a combobox on my small user control. The user control loses focus and disappears behind the main window.

    This only occurs if an excel worksheet is in the main window. If it is just a regualr xaml window than the user control doesn't lose focus.

     Has anyone encountered a similar issue like this before when working with excel worksheets? If so what was your solution to the problem.

     

    Thanks.

    Tuesday, July 12, 2011 1:30 PM

All replies

  • Hi Pritesh3,

    Sounds similar to this issue. If it's the same problem as yours, you can vote that connect post to raise its priority.

    Meanwhile, I am trying to involve someone familiar with this topic to further look at this issue.

    There might be some time delay. Appreciate your patience.

    Best regards,


    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, July 13, 2011 3:34 AM
    Moderator
  • Thanks for looking into this.

     

    Pritesh

    Wednesday, July 13, 2011 5:47 AM
  • Could you post your source code so we can try to reproduce the issue on our side? Besides, what OS are you using? 


    ================
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
     
    Thanks & Regards,
    Leon Zhang
    Microsoft Online Community Support

    Friday, July 15, 2011 8:53 AM
  • Hi,

    Thanks for getting back to me and sorry for taking so long to reply.

    It would be impossible for me to post the entire source code because its quite a large application. However the application is making use of AvalonDocks (to make it an MDI application).

     

    The issue occurs when the large "main window" has an excel application embedded in it. Then when I click to create a new smaller window and try to select soething like a combobox the smaller window loses focus and the main application gets the focus so the small window is actually just behind it.

    The os is windows XP.

    Sorry I cannot be of more help.

     

    If you know of other articles where users have discussed similar issues is it possible for you to post the links here. I can then take a look and see if there is a workaround etc.

     

    Thanks.

    Thursday, July 21, 2011 6:12 PM
  • Thaks for your update. I'll setup such a test environment and examine this problem soon, but this may take some time. If you have anything new, welcome to update this thread!

     

    ================
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Thanks & Regards,
    Teddy Feng
    Microsoft Online Community Support

    Monday, July 25, 2011 2:13 AM
  • Sorry Pritesh3, I couldn't repro this problem.

    I created a test wpf app using avalondock library (ver 1.3), with 1 dockable pane on the left, 1 document pane in

    the middle displaying a xls file content, and 1 dockable pane on the right which has a user control containing 1

    combo box. After I dragged out the right dockable pane as a float window, I selected/changed the combo box

    items and the user control containing this combo box didn't lose focus or disappear.

     

    This test app is quite simple and everything seemed alright. So could there be any logic problem in your project?

    Thanks

     

    ================
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Thanks & Regards,
    Teddy Feng
    Microsoft Online Community Support


    Thursday, July 28, 2011 2:51 AM
  • Hi teddy,

     

    I didnt understand the code that well and basically another developer was explaining the process to me. To embed excel inside a WPF window. The code is instantiating excel and then using windows forms user control to pull the excel document into it. This is then displayed inside a windowsformshost. so the axctual issue is the airspace problem. 

     

    I'm looknig for ways around it but from what I have gathered this is no easy task.

     

    sorry for wasting your time earlier.

    • Proposed as answer by Leon Zh Monday, August 8, 2011 5:11 AM
    • Unproposed as answer by Leon Zh Monday, August 8, 2011 5:11 AM
    Friday, August 5, 2011 1:47 PM