views:

11

answers:

1

OK, so I thought this would be really simple even though I have only just got by previously when working with WPF project resource files.

When my application starts I want to load in a local (shipped with the application) html file into the Webbrowser control. However I cannot find an easy way to do this! Any ideas?

A: 

Got round this in the end by setting the build action of the file to 'Copy Always' and then using Environment.CurrentDirectory to get the application directory:

string appDir = Environment.CurrentDirectory;
Uri pageUri = new Uri(appDir + "/page.html");
myWebBrowser.Source = pageUri;

That seems to work fine.

dgwyer