SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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)
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

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