This document outlines a Silverlight 4 course that covers introduction topics like layout, input handling, and deployment, as well as more advanced topics like data binding, out-of-browser capabilities, and WCF RIA Services. The course includes lessons on the evolution of Silverlight, getting started, differences between Silverlight and WPF, core controls, project types, and the anatomy of a Silverlight application. Demonstrations are provided to showcase creating a "Hello World" application and handling user input and styling changes through events.
3. Silverlight 4
• Cross browser plugin – IE (Active/X), FireFox (NSAPI),
Chrome, Safari (WebKit)
• Cross platform – Windows, MAC (Intel Only) and Linux
using Moonlight (Delayed)
• .Net programming language (C#, Visual Basic, …) and
runtime
• Works with Javascript and HTML DOM
• Not mutually exclusive
• Mobile platform : Windows 7 Phone, Nokia Symbian OS
• RIA : User interaction and Animation
4. History
• .Net Programming for client server web.
• Javascript to provide client side interactivity.
• Crippled because of Javascript compatibility.
• Microsoft wanted better control just like Java
Applets.
• So came Silverlight. Initially known as WPF/E.
• WPF History : GDI & USER, DirectX, XP’s
GDI+
5. Silverlight Evolution
• SL 1 : Graphics, hi-def media, script, text
• SL 2 : . Net Framework
• SL 3: OOB, Data binding, Common
Controls, Deployment : LOB
• SL 4 : Printing, COM Automation, Trusted
Apps, Multi touch, Webcam & Mic, Mouse
right click
6. Getting Started
• Install using Web Installer :
http://www.microsoft.com/web
Installs Web Server, Frameworks and Runtimes,
Database and Tools.
• Install Visual Studio 2010 Express (SL 3)
• http://www.microsoft.com/express/Web
• Install Silverlight Tools (SL 4)
• http://www.silverlight.net/getstarted
7. Silverlight VS WPF
• Different implementation : Same Basic Technology
• Web vs Desktop
• Subset Vs Superset of .Net Framework
• Mostly the same team works on both.
• Use #ifdef if targeting both.
• WPF features Full Hardware Acc, Drawing Types, Event tunneling.
• Silverlight Features Browser Integration, Video Brush, Deep Zoom
WPFSL
8. XAML
XML Application Markup Language
o Declarative language to describe UI.
o XML Rules apply. Don’t forget />
o Pronounced like Zammel.
o Expression Blend Tools support it.
o CAML
o BAML
o Can call Javascript function for splash
screen functionality.
10. XAML
• Type Converter
<Button Background=“Red” />
Here Red gets converted to a SolidColorBrush because
of Type Converter.
• Markup extension {}
<TextBlock text={Binding …. } />
11. Silverlight project types
• Silverlight Application : stand alone
• Silverlight Navigation : Multiple pages URI Map
• Silverlight Class Library : reuse common code
• Silverlight Business Application : RIA Services
• WCF RIA Services Class
• Unit Test Application : Added to existing SL
Proj
– Demo [Show in Visual Studio]
16. Class Project
• Create an oval. Fill color Red.
• On Mouse enter change Fill color to Blue
• On Mouse exit change color to Green
• On Mouse click change color to Purple.
Red
Blue
Green
Color: Radio Button
Oval or Rect
Combo Box
Oval or Rect
17. • As Microsoft says :
– Light up the WEB
• As Obi Wan Kanobi says it :
1. Vector graphics
Transform Animation
HD Video
2. Binary compatible (XAP Files)
No need to target separate platforms.
3. Multi language : C#, VB, IronPython, F#. CLR is same.
1. Vector graphics
Transform Animation
HD Video
2. Binary compatible (XAP Files)
No need to target separate platforms.
3. Multi language : C#, VB, IronPython, F#. CLR is same.
Custom Window Chrome
Notification Toast
VS 2010 installs Silverlight 3 - but Silverlight 4 is a separate download.
Vector graphics
Transform Animation
HD Video
Create a Label Enter Name and a text box next to it.
Create a text box below it.
Create a Button &quot;Greet&quot; and when clicked set the text &quot;Hello &lt;username&gt;&quot;