VS 2008 JavaScript Intellisense for Silverlight

Thats an interesting post from Scott Guthrie’s blog about JavaScript Intellisense for Silverlight:

In addition to shipping VS 2008 and .NET 3.5 Beta 2 last week, my team also shipped the first release candidate of Silverlight 1.0 (it was a busy week at the office!). You can download the Silverlight 1.0 RC here.

I blogged about our Silverlight plans and roadmap a few months ago. This first Silverlight 1.0 release is focused on enabling rich media scenarios, and delivers high quality video and audio streaming and XAML based vector graphics and animation support in the browser. Silverlight is cross browser and cross platform, and can be easily added to any HTML page. Silverlight 1.0 supports a JavaScript programming model that makes it easy to integrate into an AJAX based page experience (note: Silverlight 1.1 will then add a cross-platform .NET framework programming model and enable RIA support).

JavaScript Intellisense for Silverlight 1.0

Over the last few weeks I’ve blogged about the new VS 2008 JavaScript Intellisense and VS 2008 JavaScript Debugging features in Beta 2. In addition to using these JavaScript tooling features when building pure HTML AJAX solutions, you can also now take advantage of them when targeting Silverlight 1.0.

Justin-Josef Angel earlier today released an awesome Silverlight 1.0 JavaScript Intellisense CodePlex Project that helps dramatically with this. It includes some nice annotated JavaScript helper methods that provide the ability to work with any XAML element in Silverlight with full intellisense in VS 2008.

To use it, simply add his JavaScript library to the top of your page:

step1 VS 2008 JavaScript Intellisense for Silverlight

You can then use Justin’s helper functions to take late-bound objects and indicate their JavaScript type:

step2 VS 2008 JavaScript Intellisense for Silverlight

This will then cause the VS 2008 JavaScript intellisense engine to automatically provide intellisense and syntax checking for you:

step3 VS 2008 JavaScript Intellisense for Silverlight

You can learn all about Justin’s library via his excellent tutorial post here. You can then download and participate in the codeplex project here.

read original

Leave a Reply

Your email address will not be published. Required fields are marked *