Navingating to an .html file in the assembly

Posted by Joel on Stack Overflow See other posts from Stack Overflow or by Joel
Published on 2009-10-08T13:29:57Z Indexed on 2010/04/13 5:02 UTC
Read the original article Hit count: 343

Filed under:
|

I’m working with the WPF WebBrowser control to navigate to a html page hosting Silverlight. It seems I cannot use the NavigateToString or NavigateToStream method since I have Silverlight content. The html content loads fine but not Silverlight. So I think I’ll have to use the Navigate method which takes an Uri. Now I html page I’d like to navigate to is in a .html file in my Visual Studio project so I will have to have a local uri of some sort. I don’t want the html file to be copied to the output folder since I don’t want to distribute it separately; I want it to be somehow included in the assembly. The problem is that the WebBrowser control doesn’t seem to allow relative Uris or pack://application: uris.

How could I accomplish navingating to an .html file in the assembly?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about webbrowser