Integrate Documentation in a silverlight application

Mar 12, 2009 at 11:17 AM
Hi dave,

I have a docproject (not a docsite) and a  small silgerlight application. I want to integrate the documentation generated by docproject in to the silverlight application. At first i thought i simply create a webservice in the application that hosts the silverlight application (i use cannot use a web server)  which allows the user of my silverlight application to download the chm but thats not very user friendly. Now i think its better to use a simple embedded html file.

I now have the following problem: I have a large docproject with a lot of conceptual documentation. But i want just to integrate one single conceptual topic into the silverlight application. But the thing is that i dont use a web server just a simple application with a webhttpbinding (an application that has a http interface) and an embedded silverlight application that is downloaded when the user points it webbrowser to the http address bound by the application. Thus i cant use docsite, which seems to output the documentation as asp page. What is the best way to offer the topic to the user via the silverligh application?

Thx in advance!

Greetings

marc

Coordinator
Mar 15, 2009 at 4:15 AM
Hi Marc,

I don't have any experience with Silverlight so I had to do some research, but unfortunately it seems that Silverlight does not support any of the controls that WPF can use to display HTML pages; e.g., Frame, NavigationWindow, WebBrowser.   At least not in the current release, according to the following article.

§Control Support in Silverlight vs. WPF, WPF Compatibility
http://msdn.microsoft.com/en-us/library/cc903925(VS.95).aspx#control_support

Assuming that you know of, or can find some way to host HTML in a Silverlight application, you can use the web-ready HTML files that are output into your project's Help\Html folder.  Raw HTML files are generated by Sandcastle regardless of whether the project is a DocProject or DocSite.  Of course, these HTML files may depend upon resources such as images and cascading styles sheets (CSS), so you'd have to ensure that whatever the mechanism you're using to load an HTML topic into a Silverlight application, it must also be able to load the resources based on the relative paths that are present in the HTML.

- Dave