SlideShare a Scribd company logo
1 of 33
Microsoft
Silverlight
Agenda
• What is Silverlight ?
• Features
• What’s new in C# 3.0
• Controls and Containers
• Third Party Tools
• Hello World
What is Silverlight?
• Browser Plugin
• Earlier known as WPF/E (Windows Presentation Foundation /
Everywhere)
• Cross-browser, cross-platform, cross-device implementation
of the .NET Framework.
• < 10 sec download
• Provides animations, vector graphics, audio-video playback
Cross Browser
• Works on all major browsers
Cross Platform
• Works on Windows, Linux and Mac OS X
Cross Device
• Coming to Nokia and Windows Mobile phones
How to Install ?
1. Install Visual Studio 2008.
2. Install Visual Studio Service Pack 1.
3. Install Silverlight Tools for Visual Studio.
(Optional) Install Expression Blend for designing
XAML.
Supported Languages
• Silverlight 1.0
–Javascript
• Silverlight 2.0
–C#
–VB.NET
–Dynamic Lanaguages Supported
• Microsoft JScript
• IronPython
• IronRuby
Advantages
• Single, consistent runtime for browser-based applications.
• Performance is promising. (Prime Number Calculator)
• There is an official open source implementation of Silverlight
(Moonlight)
• Search engines can potentially index text within a Silverlight application,
just as they can with Flash.
• Silverlight interprets XAML directly (Flex doesn’t)
Disadvantages
• The design tools (Expression Blend and Expression Design) are
comparatively new.
• Silverlight supports SOAP web services, or REST but doesn’t have an
optimized binary protocol like Adobe’s ActionScript Message Format
(AMF), which likely means slower performance in some scenarios.
• Silverlight is a browser-only solution (Adobe has AIR).
• Development on Windows platform only.
• Yet to penetrate market.
Architecture
New Features in C# 3.0
New Features in C# 3.0
• Implicit Type Variables
var i = 1;
When the compiler sees this in the code, it tries to
figure out the type of the variable based on the value
you assigned it.
• Object Initializer
Human h = new Human {Name = “Fahim”, Age = 23};
Lambda Expressions
• A lambda expression is an anonymous function that
can contain expressions and statements.
• Example
x => x > 3
An Anonymous function that takes x (int) as an input
and returns whether x is greater than 3 or not ( true
or false).
Lambda Expression (Cont)
• Func<int,bool> myFunction = x => x > 3;
Console.WriteLine (myFunction ( 4 ) );
True
• Func<int,int,bool> myFunction = ( x ,y ) => x < y;
Console.WriteLine( myFunction ( 4 , 3 ) );
False
Attached Property
• An attached property is intended to be used
as a type of global property that is settable on
any object.
• Example
<DockPanel>
<CheckBox DockPanel.Dock="Top">Hello</CheckBox>
</DockPanel>
Extension Methods
• Special Kind of Static Methods
• Enable you to add methods to instances of
existing types without creating a new derived
type, recompiling, or modifying the original
type.
Extension Methods
class Program
{
static void Main(string[] args)
{
string name = "folio3";
Console.WriteLine(name.Decorate());
}
}
public static class StringExtension
{
public static string Decorate(this string str)
{
return "**** " + str + " ****";
}
}
LINQ
LINQ is a series of language extensions that supports data
querying in a type-safe way
LINQ
Language INtegrated Query
• The most common extension methods are the
LINQ standard query operators.
• Results from a LINQ query are as IEnumerable<T>
• Evaluation does not occur until you iterate the
results.
• Some extension methods (e.g Count) iterate the
results.
• Delayed evaluation means latest is always evaluated.
Re-evaluated if iterated again.
• Use ToArray or ToList to get a “snapshot”
Delayed Evaluation
XAML
• XAML or eXtensible Application Markup
Language is a general purpose declarative
language to create the tree of .net objects.
• Like XHTML and MXML.
XAML Example
<Grid>
<Button x:Name="buttonClick" Click="buttonClick_Click" Content="Click Here"
Width="100" Height="100" />
<Label Content="Click the button" />
</Grid>
Layout Manager Controls
• Canvas
• StackPanel
• Grid
• Border
Richer User Interfaces
• Calendar
• TextBox (w/
Watermark)
• Sliders
• Buttons
• Lists
• Lots more!
XAP File
• Really a zip file in disguise
• Contains any content marked to be included in
download and built in assemblies.
• .XAP file is what is downloaded to client machine
App.Xaml
• Contains Application Resources
• Entry point for the application
• This where you set your start page for the
application
• Handles following events
–Application Startup
–Application Exit
–Application Unhandled Exception
Job Trends
Third Party Tools
Visifire
http://www.visifire.com/
Component One
http://www.componentone.com/
Useful Links
• Official Website
http://www.silverlight.net
• Useful Article
• http://fahimilyas.blogspot.com/2008/05/road-to-s
• Silverlight Articles
http://www.silverlightarticles.com
Demo Collected By
Vinayak Nandikal

More Related Content

What's hot

Introduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayambaIntroduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayamba
Prageeth Sandakalum
 
My first experience with lambda expressions in java
My first experience with lambda expressions in javaMy first experience with lambda expressions in java
My first experience with lambda expressions in java
Scheidt & Bachmann
 
Sthomas slides
Sthomas slidesSthomas slides
Sthomas slides
SAIL_QU
 

What's hot (19)

Whats new in .NET for 2019
Whats new in .NET for 2019Whats new in .NET for 2019
Whats new in .NET for 2019
 
CNIT 126 Ch 7: Analyzing Malicious Windows Programs
CNIT 126 Ch 7: Analyzing Malicious Windows ProgramsCNIT 126 Ch 7: Analyzing Malicious Windows Programs
CNIT 126 Ch 7: Analyzing Malicious Windows Programs
 
Introduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayambaIntroduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayamba
 
Refactoring merged code - ReSharper meets SemanticMerge
Refactoring merged code - ReSharper meets SemanticMergeRefactoring merged code - ReSharper meets SemanticMerge
Refactoring merged code - ReSharper meets SemanticMerge
 
ReSharper Presentation for NUGs
ReSharper Presentation for NUGsReSharper Presentation for NUGs
ReSharper Presentation for NUGs
 
Practical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProPractical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA Pro
 
CNIT 127 Ch 4: Introduction to format string bugs
CNIT 127 Ch 4: Introduction to format string bugsCNIT 127 Ch 4: Introduction to format string bugs
CNIT 127 Ch 4: Introduction to format string bugs
 
My first experience with lambda expressions in java
My first experience with lambda expressions in javaMy first experience with lambda expressions in java
My first experience with lambda expressions in java
 
CNIT 127 Lecture 7: Intro to 64-Bit Assembler
CNIT 127 Lecture 7: Intro to 64-Bit AssemblerCNIT 127 Lecture 7: Intro to 64-Bit Assembler
CNIT 127 Lecture 7: Intro to 64-Bit Assembler
 
Part1 my
Part1 myPart1 my
Part1 my
 
9: OllyDbg
9: OllyDbg9: OllyDbg
9: OllyDbg
 
Console applications IN C#
Console applications IN C#Console applications IN C#
Console applications IN C#
 
CNIT 126 7: Analyzing Malicious Windows Programs
CNIT 126 7: Analyzing Malicious Windows ProgramsCNIT 126 7: Analyzing Malicious Windows Programs
CNIT 126 7: Analyzing Malicious Windows Programs
 
Coding Like the Wind - Tips and Tricks for the Microsoft Visual Studio 2012 C...
Coding Like the Wind - Tips and Tricks for the Microsoft Visual Studio 2012 C...Coding Like the Wind - Tips and Tricks for the Microsoft Visual Studio 2012 C...
Coding Like the Wind - Tips and Tricks for the Microsoft Visual Studio 2012 C...
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++
 
David buksbaum a-briefintroductiontocsharp
David buksbaum a-briefintroductiontocsharpDavid buksbaum a-briefintroductiontocsharp
David buksbaum a-briefintroductiontocsharp
 
Sthomas slides
Sthomas slidesSthomas slides
Sthomas slides
 
CNIT 126 9: OllyDbg
CNIT 126 9: OllyDbgCNIT 126 9: OllyDbg
CNIT 126 9: OllyDbg
 
Xml usage in my work
Xml usage in my workXml usage in my work
Xml usage in my work
 

Viewers also liked

Microsoft (SQL Server)
Microsoft (SQL Server)Microsoft (SQL Server)
Microsoft (SQL Server)
Vinayak Hegde
 
Microsoft (Projects)
Microsoft (Projects)Microsoft (Projects)
Microsoft (Projects)
Vinayak Hegde
 
Microsoft (Office 2007)
Microsoft (Office 2007)Microsoft (Office 2007)
Microsoft (Office 2007)
Vinayak Hegde
 
Microsoft (Strength And Weakness)
Microsoft (Strength And Weakness)Microsoft (Strength And Weakness)
Microsoft (Strength And Weakness)
Vinayak Hegde
 
Microsoft (Intro To Office)
Microsoft (Intro To Office)Microsoft (Intro To Office)
Microsoft (Intro To Office)
Vinayak Hegde
 
Microsoft (Virtualization 2008)
Microsoft (Virtualization 2008)Microsoft (Virtualization 2008)
Microsoft (Virtualization 2008)
Vinayak Hegde
 

Viewers also liked (7)

Microsoft (SQL Server)
Microsoft (SQL Server)Microsoft (SQL Server)
Microsoft (SQL Server)
 
Microsoft (Projects)
Microsoft (Projects)Microsoft (Projects)
Microsoft (Projects)
 
Microsoft (Office 2007)
Microsoft (Office 2007)Microsoft (Office 2007)
Microsoft (Office 2007)
 
Microsoft (Strength And Weakness)
Microsoft (Strength And Weakness)Microsoft (Strength And Weakness)
Microsoft (Strength And Weakness)
 
Smart Antennas
Smart AntennasSmart Antennas
Smart Antennas
 
Microsoft (Intro To Office)
Microsoft (Intro To Office)Microsoft (Intro To Office)
Microsoft (Intro To Office)
 
Microsoft (Virtualization 2008)
Microsoft (Virtualization 2008)Microsoft (Virtualization 2008)
Microsoft (Virtualization 2008)
 

Similar to Microsoft (Silverlight)

.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
Rajnish Kalla
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
Aarti P
 
Intro to Microsoft.NET
Intro to Microsoft.NET Intro to Microsoft.NET
Intro to Microsoft.NET
rchakra
 
Programming Language
Programming  LanguageProgramming  Language
Programming Language
Adeel Hamid
 

Similar to Microsoft (Silverlight) (20)

Microsoft Silverlight
Microsoft SilverlightMicrosoft Silverlight
Microsoft Silverlight
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
 
Lecture1_introduction to python.pptx
Lecture1_introduction to python.pptxLecture1_introduction to python.pptx
Lecture1_introduction to python.pptx
 
C# and dot net framework
C# and dot net frameworkC# and dot net framework
C# and dot net framework
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation Guide
 
Intro to Microsoft.NET
Intro to Microsoft.NET Intro to Microsoft.NET
Intro to Microsoft.NET
 
Intro to .NET and Core C#
Intro to .NET and Core C#Intro to .NET and Core C#
Intro to .NET and Core C#
 
Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?
 
dot net technology
dot net technologydot net technology
dot net technology
 
Javascript
JavascriptJavascript
Javascript
 
Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX Developers
 
Programming Language
Programming  LanguageProgramming  Language
Programming Language
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Developer’s viewpoint on swift programming language
Developer’s viewpoint on swift programming languageDeveloper’s viewpoint on swift programming language
Developer’s viewpoint on swift programming language
 
ASP DOT NET
ASP DOT NETASP DOT NET
ASP DOT NET
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Introduction to .NET
Introduction to .NETIntroduction to .NET
Introduction to .NET
 

More from Vinayak Hegde

Microsoft (Office 2007 And Math Edit)
Microsoft (Office 2007 And Math Edit)Microsoft (Office 2007 And Math Edit)
Microsoft (Office 2007 And Math Edit)
Vinayak Hegde
 
Microsoft (Intro To Office)
Microsoft (Intro To Office)Microsoft (Intro To Office)
Microsoft (Intro To Office)
Vinayak Hegde
 
Antarctica Information 2009
Antarctica Information 2009Antarctica Information 2009
Antarctica Information 2009
Vinayak Hegde
 
Antarctica Be Developed
Antarctica Be DevelopedAntarctica Be Developed
Antarctica Be Developed
Vinayak Hegde
 
Operation Taj Real Heroes
Operation Taj Real HeroesOperation Taj Real Heroes
Operation Taj Real Heroes
Vinayak Hegde
 
Karnataka Nature Snaps
Karnataka Nature SnapsKarnataka Nature Snaps
Karnataka Nature Snaps
Vinayak Hegde
 
China Poisoned Milk Must Know For Your Own Safety
China Poisoned Milk   Must Know For Your Own SafetyChina Poisoned Milk   Must Know For Your Own Safety
China Poisoned Milk Must Know For Your Own Safety
Vinayak Hegde
 
Python
PythonPython
Learn Python
Learn PythonLearn Python
Learn Python
Vinayak Hegde
 
Human Area Networking Technology
Human Area Networking TechnologyHuman Area Networking Technology
Human Area Networking Technology
Vinayak Hegde
 
The Future Of Technology
The Future Of TechnologyThe Future Of Technology
The Future Of Technology
Vinayak Hegde
 

More from Vinayak Hegde (20)

Microsoft (Office 2007 And Math Edit)
Microsoft (Office 2007 And Math Edit)Microsoft (Office 2007 And Math Edit)
Microsoft (Office 2007 And Math Edit)
 
Microsoft (Intro To Office)
Microsoft (Intro To Office)Microsoft (Intro To Office)
Microsoft (Intro To Office)
 
IBMSoftware
IBMSoftwareIBMSoftware
IBMSoftware
 
Antarctica Information 2009
Antarctica Information 2009Antarctica Information 2009
Antarctica Information 2009
 
Antarctica Be Developed
Antarctica Be DevelopedAntarctica Be Developed
Antarctica Be Developed
 
Operation Taj Real Heroes
Operation Taj Real HeroesOperation Taj Real Heroes
Operation Taj Real Heroes
 
Karnataka Nature Snaps
Karnataka Nature SnapsKarnataka Nature Snaps
Karnataka Nature Snaps
 
Fitness Check
Fitness CheckFitness Check
Fitness Check
 
China Poisoned Milk Must Know For Your Own Safety
China Poisoned Milk   Must Know For Your Own SafetyChina Poisoned Milk   Must Know For Your Own Safety
China Poisoned Milk Must Know For Your Own Safety
 
Bmx Tricks (Game)
Bmx Tricks (Game)Bmx Tricks (Game)
Bmx Tricks (Game)
 
Best Websites List
Best Websites ListBest Websites List
Best Websites List
 
Autobahn (Game)
Autobahn (Game)Autobahn (Game)
Autobahn (Game)
 
Threat To Hinduism
Threat To HinduismThreat To Hinduism
Threat To Hinduism
 
Never Sick Again
Never Sick AgainNever Sick Again
Never Sick Again
 
Network Programming
Network ProgrammingNetwork Programming
Network Programming
 
Python
PythonPython
Python
 
Learn Python
Learn PythonLearn Python
Learn Python
 
Human Area Networking Technology
Human Area Networking TechnologyHuman Area Networking Technology
Human Area Networking Technology
 
The Future Of Technology
The Future Of TechnologyThe Future Of Technology
The Future Of Technology
 
Teamwork
TeamworkTeamwork
Teamwork
 

Recently uploaded

會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 

Recently uploaded (20)

Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 
Benefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptxBenefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptx
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptx
 
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 

Microsoft (Silverlight)

  • 2. Agenda • What is Silverlight ? • Features • What’s new in C# 3.0 • Controls and Containers • Third Party Tools • Hello World
  • 3. What is Silverlight? • Browser Plugin • Earlier known as WPF/E (Windows Presentation Foundation / Everywhere) • Cross-browser, cross-platform, cross-device implementation of the .NET Framework. • < 10 sec download • Provides animations, vector graphics, audio-video playback
  • 4. Cross Browser • Works on all major browsers
  • 5. Cross Platform • Works on Windows, Linux and Mac OS X
  • 6. Cross Device • Coming to Nokia and Windows Mobile phones
  • 7. How to Install ? 1. Install Visual Studio 2008. 2. Install Visual Studio Service Pack 1. 3. Install Silverlight Tools for Visual Studio. (Optional) Install Expression Blend for designing XAML.
  • 8. Supported Languages • Silverlight 1.0 –Javascript • Silverlight 2.0 –C# –VB.NET –Dynamic Lanaguages Supported • Microsoft JScript • IronPython • IronRuby
  • 9. Advantages • Single, consistent runtime for browser-based applications. • Performance is promising. (Prime Number Calculator) • There is an official open source implementation of Silverlight (Moonlight) • Search engines can potentially index text within a Silverlight application, just as they can with Flash. • Silverlight interprets XAML directly (Flex doesn’t)
  • 10. Disadvantages • The design tools (Expression Blend and Expression Design) are comparatively new. • Silverlight supports SOAP web services, or REST but doesn’t have an optimized binary protocol like Adobe’s ActionScript Message Format (AMF), which likely means slower performance in some scenarios. • Silverlight is a browser-only solution (Adobe has AIR). • Development on Windows platform only. • Yet to penetrate market.
  • 12. New Features in C# 3.0
  • 13. New Features in C# 3.0 • Implicit Type Variables var i = 1; When the compiler sees this in the code, it tries to figure out the type of the variable based on the value you assigned it. • Object Initializer Human h = new Human {Name = “Fahim”, Age = 23};
  • 14. Lambda Expressions • A lambda expression is an anonymous function that can contain expressions and statements. • Example x => x > 3 An Anonymous function that takes x (int) as an input and returns whether x is greater than 3 or not ( true or false).
  • 15. Lambda Expression (Cont) • Func<int,bool> myFunction = x => x > 3; Console.WriteLine (myFunction ( 4 ) ); True • Func<int,int,bool> myFunction = ( x ,y ) => x < y; Console.WriteLine( myFunction ( 4 , 3 ) ); False
  • 16. Attached Property • An attached property is intended to be used as a type of global property that is settable on any object. • Example <DockPanel> <CheckBox DockPanel.Dock="Top">Hello</CheckBox> </DockPanel>
  • 17. Extension Methods • Special Kind of Static Methods • Enable you to add methods to instances of existing types without creating a new derived type, recompiling, or modifying the original type.
  • 18. Extension Methods class Program { static void Main(string[] args) { string name = "folio3"; Console.WriteLine(name.Decorate()); } } public static class StringExtension { public static string Decorate(this string str) { return "**** " + str + " ****"; } }
  • 19. LINQ LINQ is a series of language extensions that supports data querying in a type-safe way
  • 20. LINQ Language INtegrated Query • The most common extension methods are the LINQ standard query operators.
  • 21. • Results from a LINQ query are as IEnumerable<T> • Evaluation does not occur until you iterate the results. • Some extension methods (e.g Count) iterate the results. • Delayed evaluation means latest is always evaluated. Re-evaluated if iterated again. • Use ToArray or ToList to get a “snapshot” Delayed Evaluation
  • 22. XAML • XAML or eXtensible Application Markup Language is a general purpose declarative language to create the tree of .net objects. • Like XHTML and MXML.
  • 23. XAML Example <Grid> <Button x:Name="buttonClick" Click="buttonClick_Click" Content="Click Here" Width="100" Height="100" /> <Label Content="Click the button" /> </Grid>
  • 24. Layout Manager Controls • Canvas • StackPanel • Grid • Border
  • 25. Richer User Interfaces • Calendar • TextBox (w/ Watermark) • Sliders • Buttons • Lists • Lots more!
  • 26. XAP File • Really a zip file in disguise • Contains any content marked to be included in download and built in assemblies. • .XAP file is what is downloaded to client machine
  • 27. App.Xaml • Contains Application Resources • Entry point for the application • This where you set your start page for the application • Handles following events –Application Startup –Application Exit –Application Unhandled Exception
  • 32. Useful Links • Official Website http://www.silverlight.net • Useful Article • http://fahimilyas.blogspot.com/2008/05/road-to-s • Silverlight Articles http://www.silverlightarticles.com