none
hosting a webbrowser RRS feed

  • Question

  • hello created a webbrowser in winforms, but now i want to create a new design. how can i host webbrowser into wpf?

     

    can i get an example plz... and the referecces that are needed thx

    Wednesday, July 4, 2007 1:38 PM

Answers

  •         

    Code Snippet

    <WindowsFormsHost>

             <wf:WebBrowser …/>

    </WindowsFormsHost>

     

     

    Where wf is this namespace:

    Code Snippet

    xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"

     

     

    Remember to add a reference to System.Windows.Forms.

    Friday, July 6, 2007 6:28 AM
  • Or use the Frame control which can host WPF Pages, or web pages. It depends on what you need from the control. The Frame is locked down -- but for general browsing might fit your needs.
    Friday, July 6, 2007 5:02 PM

All replies

  •         

    Code Snippet

    <WindowsFormsHost>

             <wf:WebBrowser …/>

    </WindowsFormsHost>

     

     

    Where wf is this namespace:

    Code Snippet

    xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"

     

     

    Remember to add a reference to System.Windows.Forms.

    Friday, July 6, 2007 6:28 AM
  • Or use the Frame control which can host WPF Pages, or web pages. It depends on what you need from the control. The Frame is locked down -- but for general browsing might fit your needs.
    Friday, July 6, 2007 5:02 PM