290 likes | 390 Views
Silverlight 4 accelerated fundamentals. Mike Taulty Microsoft Ltd @ mtaulty mtaulty@microsoft.com http://mtaulty.com. slides are meant as revision we will go quickly. talk = slides + demos. we will dig in using demos we will go more slowly. Silverlight is a browser plug-in.
E N D
Silverlight 4accelerated fundamentals Mike Taulty Microsoft Ltd @mtaulty mtaulty@microsoft.com http://mtaulty.com
slides are meant as revision we will go quickly talk =slides + demos we will dig in using demos we will go more slowly
it runsx-browser, x-platform Linux support is from Novell’s Moonlight project Release is at Silverlight version 2
with 3 released versions V4 V1 V2 V3 in beta July 2009 Sept 2007 Oct 2008 versions are back-compat, no side-by-side today you’d start on Silverlight 3 or 4
in a security sandbox strong sandbox relaxed sandbox trusted out of browser in browser
.NET applications – XAML + code XAML markup language defines UI .NET code handles interaction Silverlight .NET Application
.NET code on a CLR & framework Common .NET Development .NET Languages ( C#, VB, etc ) .NET Tools ( Visual Studio, etc ) .NET Developers & Skills Specific .NET Frameworks/Runtimes Desktop/Server Mobile Devices Silverlight .NET Framework 3.5 Sp1 .NET Compact Framework Silverlight .NET Framework
framework capabilities tools form function 2D graphics browser media host machine controls network Visual Studio 2010 Expression Blend Preview for .NET 4 layout animation styling & resources data-binding
layout system Many items in one cell Items occupying many cells Layout Panels Proportional, fixed or “right” sized rows/columns
alignment alignment content alignment layout system Margin Padding
Scale Rotate layout system Translate Skew
layout system • perspective transformations for 3D effects
built-in animation system • Animation is driven by Storyboards Storyboard DoubleAnimation ColorAnimation PointAnimation etc • animations can apply easing functions • ~10 built-in (e.g. sine) + custom
resources and styles • Elements have a dictionary of resources identified by Key • Can store arbitrary objects, not just UI objects • {StaticResource} XAML directive does hierarchical lookup • Code can access local element’s Resources dictionary styles resources • Styles contain setters for Properties and Values • Styles can derive from other styles • Styles are applied explicitly by key or implicitly • Can be changed dynamically to theme an application
databinding • Elements have a DataContext • Resolution of declarative bindings is done by hierarchically examining an element’s DataContext Grid Button
databinding databinding is key in Silverlight
in-box controls Buttons Selection Misc Input Dates Media Data
Silverlight Toolkit controls • CodePlex project with source code ‘Layout’ Panels Misc DataForm Charts Theming
controls controls are key in Silverlight
apps interop with the browser • From .NET • access the plugin settings • access the browser info • access the HTML Page • access to the HTML Window • access the HTML DOM • access the Javascript engine • From Javascript • access the plugin object • access registered .NET types • access objects in visual tree • Silverlight Silverlight • secure x-app communication • spans browser instances • includes out-of-browser apps Silverlight Silverlight controlled by plug-in security settings
rich internet applications firewall site of origin other sites intranet servers
network network is key in Silverlight
apps interop with the machine John’s session (next) will cover this • read/write files • isolated storage • via explicit open/save file dialogs • without dialogs • detect network status & changes • display notification windows • access the local clipboard • access a webcam/microphone • print via a print dialog • act as a drop target for files • call local COM code
resources www.silverlight.net
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.