2

I know that possible to bundle

eg.

index.html
main.css
jQuery.js
Logo.gif

into an assembly (DLL) and use it in WPF via res:// protocol, but I cannot find any project template in Visual Studio 2010/2012 to do it.

How it is possible to do this?

NoWar
  • 36,338
  • 80
  • 323
  • 498

1 Answers1

3

You want to create what is called Resource File. There is wizard for creating this type of file:

File -> New -> File -> C# -> Resource File on my VS2010.

Nemanja Boric
  • 21,627
  • 6
  • 67
  • 91
  • Could u tell me how do I can access index.html in that file? I need to access it in WPF. Thank you! – NoWar Feb 07 '13 at 15:26
  • @Peretz http://msdn.microsoft.com/en-us/library/aa970494.aspx, http://stackoverflow.com/questions/9420767 , http://stackoverflow.com/questions/665764 ... – Nemanja Boric Feb 07 '13 at 15:28
  • @NemanjaBoric: that's not exactly helpful for the `WebBrowser` control. – user7116 Feb 07 '13 at 15:28
  • @sixlettervariables perhaps this is more helpful. http://stackoverflow.com/questions/1254605, or this http://stackoverflow.com/questions/9934357/how-to-load-html-javascript-from-embedded-resource-into-winform-web-browser. In any case, there is lot of resources (hah!) available for researching more. – Nemanja Boric Feb 07 '13 at 15:33
  • wb.Navigate("res://WpfApplication12.exe/index.html"); it is not working but index,html is under main resource file... – NoWar Feb 07 '13 at 15:41