Silverlight within a short time has made great progress and
continues its battle with Adobe applications such as Flash and Adobe Air.
Clearly the battle lines are drawn. Adobe is no soft stuff either. But
Silverlight has great capability. Events like the Presidential Election and the
Olympics have left a lasting impression. Also anybody who has interacted with
Netflix or Playboy would know the difference it has made for user experience.
This article is about developing an animation application
using the Silverlight Application project that you find in Visual Studio 2008
with SP1. You must download Silverlight 3.0 and Silverlight Tools as described
in a number of posts in my blog http://hodentek.blogspot.com. Why did I choose
animation? It's the best eye candy and it sure arrests attention. I am not
adept at animation but I describe some of the basics to go about creating
animation. The Out of browser experience possible with Silverlight 3.0 is also
described.
About Silverlight Application
File | New | Project... opens the New Project window. Expand
Visual Basic and highlight Silverlight as shown.

Click on Silverlight Application in Visual Studio installed
templates. [If you don't find this then your installation is incomplete. Get
the latest installation items from http://silverlight.net/GetStarted/]. This
will create an application with a default name, SilverApplication1. Change it
to something different. Herein it is named SL3Animation. When you click OK, the
New Silverlight Application window gets displayed as shown.

You can create either an ASP.NET Web Application Project or
an ASP.NET Web Site. Here the Application Project is chosen. When you click
after making this choice you will have created the whole set of template items
that you see in the Solution Explorer as shown in the next figure.

You have actually two projects, a vb project and a web
project. Further more; the web project has both a HTML page as well as an ASPX
page. Behind the scenes what this amounts to is that in the case of the HTML
page [SL3AnimationTesPage.html] a Silverlight ActiveX control gets embedded
which you can find in the Silverlight.js file. The
ActiveX control is named AgControl (good use of the
chemical formula for silver). The design surface of the HTML is empty except
for a <div/> element to display run time errors.
In the case of SL3AnimationTestPage.aspx, a Silverlight
ASP.NET control gets added to the page as shown in the <Form/> element of
the ASPX page. In design view you may see a 3-D cube in a light blue background
color.
Listing 1
<form id="form1" runat="server" style="height:100%;">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div style="height:100%;">
<asp:Silverlight ID="Silverlight1" runat="server"
Source="~/ClientBin/SL3Animation.xap"
MinimumVersion="3.0.40307.0" Width="100%" Height="100%" />
</div>
</form>
Silverlight applications are based on XMAL, the new
declarative markup language. The ActiveX control AgControl as well as the ASP.NET Silverlight control get
their content from the MainPage.XAML that you find in
the VB Project. If you now browse the HTML or the ASPX page you will see an empty
browser as nothing has been added to the template as yet.