How to Embed a Web Browser in WPF
Windows Presentation Foundation, or WPF, software lets users create Windows-based applications through Microsoft Visual Studio. Custom applications can be programmed to fulfill various functions including embedded forms, animations, images and even a Web browser through page controls. Visual Studio lets you embed the Web browser page control to your WPF application.
Instructions
-
-
1
Click “Start,” “All Programs” and then select “Microsoft Visual Studio.”
-
2
Click “File” and “Open” from the top menu. Select the WPF application from the Browse window and click “Open.”
-
-
3
Copy and paste the following code where you want the Web browser to appear:
<WebBrowser x:Name="wbMain" Margin="30">
</WebBrowser> -
4
Click “File” then “Save.”
-
1