JavaScript is the lone programming language supported in Silverlight v1.0 -- remember, the .NET Framework comes with v1.1. Therefore, programming JavaScript is a fundamental skill for Silverlight application development. Here we link to a nine-part tutorial, plus a blog entry from Silverlight guru Scott Guthrie, which should ease some of the JavaScript pain that .NET developers feel. After perusing this tips, check out the next section of the Silverlight Learning Guide, which offers a final set of reference materials.

Download this free guide

Download: The Developer's Guide to IoT

The IoT world may be exciting, but there are serious technical challenges that need to be addressed, especially by developers. In this handbook, learn how to meet the security, analytics, and testing requirements for IoT applications.

By submitting my Email address I confirm that I have read and accepted the Terms of Use and Declaration of Consent.

By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.

You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.

Tutorial: Silverlight with JavaScript: A sonnet in nine parts (Dave Campbell) Dave Campbell has penned a nine-part series on Silverlight programming using JavaScript. He was inspired to write such a series because, he said, "I realized that there really still are a lot of developers out there [who] have not actually tried their hand at Silverlight yet because of the perceived complexity involved."

Part 1: An introduction to SilverlightHere Campbell introduces developers to the three things they need to use Silverlight to enhance an existing Web application -- the existing HTML file, a XAML file for specifying the canvas and the Silverlight.js file that comes with the Silverlight 1.0 RC Software Development Kit (SDK).

Part 2: Silverlight controlsThis entry looks into creating Silverlight controls within a Web page. The author has opted to use "createObjectEx()" instead of "createObject()", as the former offers more parameters

Part 3: Silverlight and XAMLThis installment offers a look at the XAML file, the object hierarchy of the canvas that the XAML defines, and how XAML objects are related to JavaScript events.

Part 4: Silverlight objectsHere the author gives his objects a name, adds some functionality and points out an annoyance with the object hierarchy that you wouldn't notice just be looking at the code.

Part 5: The Silverlight canvasIn this installment, Campbell offers some insight into the use of the Canvas, which is a placeholder for two or more objects united around the same mouse event, TextBox or whatnot. This involves some new JavaScript code, but it should not be unfamiliar code.

Part 6: Silverlight animationAnimation is a big Silverlight selling point. This part looks at non-interactive animations, exploring the triggers that get an animation going, the parameters that define the triggers controlling an animation and the best ways to work with a "double animation."

Part 7: Silverlight animation reduxTo make an animation start of stop "without having to resort to [the] subterfuge" of timing out or hiding an object, just go into the JavaScript and make sure the page contains a global parameter and a ClickMe event.

Part 8: Silverlight gradientsHere Campbell looks at linear and radial gradients. Many tools can create them, but Silverlight offers some nice runtime effects, like filling a gradient as a page runs, and can change gradient parameters at runtime.

Part 9: Silverlight Gradients redux The final piece of this Silverlight puzzle demonstrates how to move the origin of a radial gradient with the mouse at runtime. This, as you might expect, involves writing a MouseMove event in JavaScript.

JavaScript IntelliSense in Visual Studio 2008 (Scott Guthrie)With the release of VS 2008 Beta 2, the new IDE's JavaScript IntelliSense and JavaScript Debugging features can now be applied to Silverlight applications. This short post (well, short for a Scott Guthrie post) shows how to activate this functionality.

0 comments

Register

Login

Forgot your password?

Your password has been sent to:

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy