Welcome to MSDN Blogs Sign in | Join | Help

WPF WebBrowser Control Sample

Want to learn how to host web content in WPF, load Word Docs into WPF, etc? How about calling HTML script and Word from WPF and vice versa? Attached is a simple sample that demonstrates using the WebBrowser control to host content. Specifically, it shows the following:

  • Navigating on the web (e.g. navigating to websites, going back and forward in the history, refreshing the page).
  • Bridging WPF and HTML -- Control the WPF application from hosted HTML script and call HTML script using WPF.
  • Bridging WPF and Microsoft Word -- load a Word page into the WebBrowser and then using WPF save the Word File.
  • Demonstrates use of most of the WebBrowser control's members.
Published Monday, August 18, 2008 4:25 PM by wcsdkteam
Filed under: ,

Attachment(s): WebBrowserSample.zip

Comments

# Word runs externally

When you said "load Word docs into WPF", what did you mean?  I have Office 2007 installed, and so I'm using the Office 2007 Word PIA, and when I click the "Load Word Doc" button, Word launches externally, not inside the WebBrowser control in the Window.  That's not what I expected.

Thanks,

Eric

Tuesday, August 19, 2008 1:16 PM by small_mountain
Anonymous comments are disabled
 
Page view tracker