none
Hosting a winforms control inside a wpf window problem RRS feed

  • Question

  • Hello I am trying to host a Winforms control (which contains a chartcontrol) using the winformshost control inside a wpf window built as an IDE (dockable windows with autohidden feature), the problem appears when the winforms control is visible, and i do AutoHide a panel window (like the properties window the visual studio IDE), the winforms control appears always on the top, but when the winforms control is not visible (another wpf control is visible), there will be no problem. Is is a bug in the hosting of winforms controls inside a WPF window ??? please, i need your help Thanks.
    Saturday, February 19, 2011 6:03 AM

Answers

  • Hi the white,

    -->       a higher z-order than any of the WPF Content

    Based on my experience, I think it is the truth.

    -->       and so i will not be able to solve the problem ???

    I am not sure the solution and your specific needs, so I could not provide you some solutions or workaround.

    However, if you want to reset the z-order to resolve your issue, I think it is not possible, about the reason, I think you could refer to this article in MSDN, the link is:

    http://msdn.microsoft.com/en-us/library/ms744952.aspx

    After read above article, I think you will know more, might you could find another solution for your issue.

     

    Best regards,


    Sheldon _Xiao [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.

    Tuesday, February 22, 2011 6:03 AM
    Moderator

All replies

  • hi,

    can u pls put some xaml and code for better understanding of the issue

    Saturday, February 19, 2011 7:01 AM
  • Thanks for the reply, really i will cannot put a simple code because i am using a 3rd party components, but the problem is in the winformshost control which is always displaying on the top of the screen and no windowless control can be shown above it (like my autohidden tab pages). i think that my problem is same of that one: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/25fedb31-921a-473e-8841-1594ee10cd9d : "When you use the WinForms integration feature that ships with WPF to host a WinForms control, the WinForms control has a higher z-order than any of the WPF content. Therefore, you can't overlay WPF content on the map." What this means "a higher z-order than any of the WPF Content", is this a mistake, or this is a real, and so i will not be able to solve the problem ??? Thanks
    Saturday, February 19, 2011 3:24 PM
  • Hi the white,

    -->       a higher z-order than any of the WPF Content

    Based on my experience, I think it is the truth.

    -->       and so i will not be able to solve the problem ???

    I am not sure the solution and your specific needs, so I could not provide you some solutions or workaround.

    However, if you want to reset the z-order to resolve your issue, I think it is not possible, about the reason, I think you could refer to this article in MSDN, the link is:

    http://msdn.microsoft.com/en-us/library/ms744952.aspx

    After read above article, I think you will know more, might you could find another solution for your issue.

     

    Best regards,


    Sheldon _Xiao [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.

    Tuesday, February 22, 2011 6:03 AM
    Moderator
  • Hi the white,

    I am marking your issue as "Anwered", if you have new findings about your issue, please let me know.

     

    Best regards,


    Sheldon _Xiao [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.

    Monday, February 28, 2011 12:24 PM
    Moderator