Mike Taulty MIX10 Silverlight 4 Accelerated Fundamentals

1,085 views
1,005 views

Published on

Session slides from MIX10 Silverlight 4 workshop.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,085
On SlideShare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mike Taulty MIX10 Silverlight 4 Accelerated Fundamentals

  1. 1. Silverlight 4 accelerated fundamentals Mike Taulty Microsoft Ltd @mtaulty mtaulty@microsoft.com http://mtaulty.com
  2. 2. slides are meant as revision we will go quickly talk = slides + demos we will dig in using demos we will go more slowly
  3. 3. Silverlight is a browser plug-in
  4. 4. it runs x-browser, x-platform Linux support is from Novell’s Moonlight project Release is at Silverlight version 2
  5. 5. with 3 released versions V1 V2 V3 Sept 2007 Oct 2008 July 2009 versions are back-compat, no side-by-side today you’d start on Silverlight 3 or 4
  6. 6. for browser launched, rich internet apps
  7. 7. in a security sandbox in browser out of browser trusted
  8. 8. .NET applications – XAML + code XAML markup language .NET code handles interaction defines UI Silverlight .NET Application
  9. 9. .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
  10. 10. framework capabilities layout animation styling & resources data-binding
  11. 11. layout system Many items in one cell Items occupying many cells Layout Panels Grid StackPanel Canvas Custom Proportional, fixed or “right” sized rows/columns
  12. 12. layout system alignment content alignment alignment Margin Padding
  13. 13. layout system Skew Scale Translate Rotate
  14. 14. layout system • perspective transformations for 3D effects
  15. 15. built-in animation system • Animation is driven by Storyboards Storyboard BeginTime Repeat Duration ... From To By ... BeginTime Repeat Duration ... DoubleAnimation From To By ... ColorAnimation BeginTime Repeat Duration ... From To By ... PointAnimation BeginTime Repeat Duration ... From To By ... etc > animations can apply easing functions > ~10 built-in (e.g. sine) + custom
  16. 16. 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 resources • Styles contain setters for Properties and Values • Styles can derive from other styles • Styles are applied explicitly by key or implicitly styles • Can be changed dynamically to theme an application
  17. 17. databinding Grid • Elements have a DataContext • Resolution of declarative bindings is done by hierarchically Button examining an element’s DataContext
  18. 18. databinding databinding is key in Silverlight
  19. 19. rich graphical capabilities Rectangle Effects Polygon Brushes Line Graphics Text Polyline Ellipse Path Geometry
  20. 20. rich media capabilities Video Ink Audio • H.264 • WMA • WMV • 7,8,9 • 1,2,3,A,VC-1 • MP3 • VideoBrush • Smooth • AAC Streaming • Playlists Imaging • Markers • Image • DRM • ImageBrush • DeepZoom • VC-1 Html • WriteableBitmap • H.264 • On/Offline • WebBrowser • HtmlBrush
  21. 21. in-box controls Button AutoCompleteBox ComboBox ChildWindow CheckBox PasswordBox ListBox DescriptionViewer HyperlinkButton RichTextArea TabControl Frame RadioButton Label TreeView GridSplitter RepeatButton TextBlock NotificationWindow ToggleButton ValidationSummary ScrollViewer Slider Image ToolTip MediaElement DataGrid Calendar ViewBox MultiScaleImage DataPager DatePicker WebBrowser
  22. 22. Silverlight Toolkit controls • CodePlex project with source code Accordion ButtonSpinner LayoutTransformer UpDown Controls TransitioningContentControl Rating DockPanel TimePicker Expander WrapPanel Drag/Drop BusyIndicator GlobalCalender
  23. 23. controls controls are key in Silverlight
  24. 24. 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 Silverlight • From Javascript – access the plugin object – access registered .NET types Silverlight – access objects in visual tree • Silverlight  Silverlight – secure x-app communication – spans browser instances – includes out-of-browser apps
  25. 25. rich internet applications firewall
  26. 26. network network is key in Silverlight
  27. 27. apps interop with the machine • 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
  28. 28. resources www.silverlight.net
  29. 29. © 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.

×