Tonight was the first chance I've had to spend any time with Silverlight since the weekend. When it rains, it pours. When septic tanks back up, you have to rearrange your priorities a bit.

Tonight I started a new Silverlight 1.1 project in which I created a few textareas that I'm planning on reading and modifying through my Silverlight application. I was going through the
Dom Access Quickstart and only made it to the third step in the first section before hitting a roadblock.
The quickstart says to create a variable of type
HtmlDocument, but Visual Studio doesn't list it in Intellisense! My first thought was maybe that the System.Web name space needed to be referenced, but when I tried to add a reference to the project I didn't see it as an option. In fact, there are only a handful of assemblies available to reference by default.

My next thought was to hit the
Silverlight.net Forums and look for a post where someone else had the same problem. Guess what? The forums don't have a search function. After reading through 3 pages I gave up and tried Google.
My search for
'silverlight htmldocument' led me to "
Silverlight how-to: let the DOM interact with Silverlight". While the demo is very basic and regurgitates what's already available in the Quickstarts, it had one piece of information that made all the difference: it mentions that I need to add a reference to
System.Windows.Browser in order to get to the HtmlDocument.
In retrospect, I could have probably found this a lot quicker if I'd just searched for HtmlDocument on MSDN. However, when I tried this, all I found was links to HtmlDocument in System.Windows.Forms. Buried in the search results I did find a link to Dave Relyea's post "
Calling Javascript from C#" which is a much better resource.
This solved my problem and I'm ready to move on. Maybe tomorrow I'll be able to make some headway on some of the ideas I want to try.
Labels: silverlight, sprint