none
Host a wpf window in a wpf window

    Question

  • I need host a wpf window (can't convert to UserControl) in a wpf window .
    In windows form ,we can use TopLevel=false to do it.
    How we can do in WPF ?
    Thanks.

    To be code or not . It is a problem.
    Friday, February 27, 2009 3:33 AM

Answers

  • This is not possible in WPF.  WPF Window is the root of the element tree.

    WPF window can be an owner of another WPF window but not a host.


    vb.net GUI
    • Marked as answer by Tao Liang Friday, February 27, 2009 5:22 AM
    Friday, February 27, 2009 5:09 AM

All replies

  • This is not possible in WPF.  WPF Window is the root of the element tree.

    WPF window can be an owner of another WPF window but not a host.


    vb.net GUI
    • Marked as answer by Tao Liang Friday, February 27, 2009 5:22 AM
    Friday, February 27, 2009 5:09 AM
  • Great .


    To be code or not . It is a problem.
    Friday, March 6, 2009 1:47 PM
  • Just a guess, but in a pinch, I think you can host a win32 window in WPF and vice versa, so MAYBE your WPF window could host a Win32 window that hosts a WPF window if you are desperate.  So 
    Friday, March 6, 2009 1:58 PM
  • If a UserControl can be used instead of a Window, how would that be done? I have been looking forever online on how to do that, but can't find an answer.

    Thanks for your time!
    Friday, March 6, 2009 3:20 PM
  • if its not too late.. check this..

    http://www.kirupa.com/blend_wpf/custom_wpf_windows.htm
    vb.net GUI
    Monday, April 20, 2009 8:26 AM