Silverlight 1.0 Javascript intellisense

I’ve been busy with Silverlight 1.0 for a couple of days now and I must say it’s a nice thing to work with. The biggest downside is that I don’t have that much experience with javascript (yes, I know Silverlight 2.0 has .net code, but I want to learn Silverlight 1.0 as well). So it’s a bit of a steep learning curve but I’m up for the challenge..

Another downside is the bad support for intellisense, the new javascript intellisense in Visual Studio 2008 however is great..the XAML integration in Silverlight however isn’t.

Now Justin-Josef Angel created a project and placed it on Codeplex. When downloaded you will find 2 js files. These files contain a complete Silverlight 1.0 Javescript intellisense. It is really nice to work with! You just convert your element to the appropriate type and you get the matching intellisense. Here’s an example:

image

In the previous image you see that I first created a var and then looked for the item in the sender object. I also converted this to a textBlock. Now when I want to call something from mytext, you see that I get the complete intellisense for that specific item. I get a complete list of getters, setters and I get the ability to add eventhandlers here. Awesome..

 

To install this you basically have to drag the 2 js files from the zip to your solution and add a couple of references. I was looking to ease up this process, because if you have to add all that every time you create a project, well it’s just a lot of pointless copy/paste work :p

I made a template project where everything is included. Here are the steps you need to take:

1) Download this zip file

2) In Vista: Go to the following directory:

C:\Users\[YOUR USERNAME]\Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual C#

In Xp this is the same however it starts with C:\Documents & Settings..and so on.

3) In this directory create a folder called Silverlight

4) Go in to the Silverlight folder and paste the zip file here which you downloaded in step 1

5) open a command prompt and browse to this location:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE

6) Make sure Visual Studio 2008 is closed and execute the following command:
devenv.exe /setup

Make sure that this program runs and wait until it’s done (check taskmanager!)

7) After it’s done you should be able to create a Silverlight 1.0 application with Silverlight 1.0 Javascript intellisense. Should be something like this:

image

 

For more information you can check the Codeplex link in this post or ask your question as a comment.


No comments yet. Be the first.

Leave a reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word