host a winform(include a webBrowser controller) into WPF,failed RRS feed

  • Question

  • hi all :

    I want to host a winform including a webBrowser controller into WPF, but I failed.


    1. I create a "windowControlLibrary" project, named "test" . Insert a webbrowser controller into the "UserControl1" form ,  and keep it display web page well,  

    create a .snk file and set it the sign of the project.


    2. create a wpf project. insert a canvas into the "window1".




      WindowsFormsHost  host = new  WindowsFormsHost();
         test.UserControl1  uc = new UserControl1();

       host.Child = uc;


    when it runs, it don't prompt any error and display nothing.


    of course,I reference the related dll file.



    Thursday, June 14, 2007 9:37 AM


  • Hello, by default, the Width and Height of the WindowsFormsHost is 0. You need to set a Width and Height for it.

    Tuesday, June 19, 2007 4:32 AM

All replies