I have a C# WPF application. In my UI I have a WebBrowser that is collapsed and will remain collapsed at all times. In my code behind I want to create an HTML document and load this document into the collapsed WebBrowser.
The only thing I can think of is writing my HTML as a string and then using File.Create() to create file and then using Browser.Navigate to navigate to that file.
The problem is though, I don't want to create any temp files on the computer or have to reference any file paths. Is there any way to create some kind of HTML file object in memory and then pass this object to the WebBrowser to be loaded?