Silverlight Beginner's Tutorial


Laurence Moroney over at Information Week has posted a great beginner's Silverlight tutorial that covers the following:

  • Your First Silverlight Application
  • Understanding XAML
  • Understanding the Blend series of Products
  • Building Silverlight applications using Aptana on the Mac
  • Building Silverlight applications using Visual Studio Express on the PC
  • Programming Silverlight 1.0 with JavaScript

Click here to start the tutorial

the onLoad: handleLoad in CreateSilverlight.js is not calling the function handleLoad in the MainPage.xaml.vb.
here is the code for the .js and the MainPage.xaml.vb :
function CreateSilverlight()
source: "MainPage.xaml.vb",
parentElement: document.getElementById("silverlightControlHost"),
id: "SilverlightControl",
width: "100%",
height: "100%",
version: "1.0"
onLoad: handleLoad

Partial Public Class MainPage
Inherits UserControl

Public Sub New()
End Sub

Dim SilverlightControl As Object
Dim theTextBlock As Object

Function handleLoad(ByVal control, ByVal userContext, ByVal rootElement) As String
SilverlightControl = control
theTextBlock = SilverlightControl.content.findName("txt")
Return theTextBlock.addEventListener("MouseLeftButtonDown", "FireEvents")
End Function

Function FireEvents(ByVal sender, ByVal args) As String
Return theTextBlock.Text = "You clicked me!"
End Function

End Class

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <div> <blockquote> <object> <embed> <img> <param>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.