Upload
ukdpe
View
836
Download
2
Tags:
Embed Size (px)
DESCRIPTION
Session slides from MIX10 Silverlight 4 workshop.
Citation preview
Silverlight 4 accelerated fundamentals
Mike Taulty
Microsoft Ltd
@mtaulty
http://mtaulty.com
talk = slides + demos
slides are meant as revision we will go quickly
we will dig in using demos we will go more slowly
Silverlight is a browser plug-in
it runs x-browser, x-platform
Linux support is from Novell’s Moonlight project Release is at Silverlight version 2
with 3 released versions
versions are back-compat, no side-by-side today you’d start on Silverlight 3 or 4
V1
Sept 2007
V2
Oct 2008
V3
July 2009
V4
in beta
for browser launched, rich internet apps
in a security sandbox
in browser out of browser trusted
XAML markup language defines UI
.NET code handles interaction
Silverlight .NET Application
.NET applications – XAML + code
Specific .NET Frameworks/Runtimes
Desktop/Server
.NET Framework 3.5 Sp1
Mobile Devices
.NET Compact Framework
.NET code on a CLR & framework
Common .NET Development
.NET Languages ( C#, VB, etc )
.NET Tools ( Visual Studio, etc )
.NET Developers & Skills
Silverlight
Silverlight .NET Framework
framework capabilities
layout
styling & resources data-binding
animation
layout system
Grid
StackPanel
Canvas
Custom
Layout Panels
Proportional, fixed or “right” sized rows/columns
Many items in one cell Items occupying many cells
layout system
Margin Padding
alignment
alig
nm
ent
content alignment
layout system
Rotate Translate Scale Skew
layout system
• perspective transformations for 3D effects
built-in animation system
• Animation is driven by Storyboards
Storyboard BeginTime Repeat Duration ...
From To By ...
DoubleAnimation
ColorAnimation
PointAnimation
etc
BeginTime Repeat Duration ...
From To By ...
BeginTime Repeat Duration ...
From To By ...
BeginTime Repeat Duration ...
From To By ...
> 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 resources
styles
• 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
Button
Grid
databinding
• Elements have a DataContext • Resolution of declarative bindings is done by hierarchically
examining an element’s DataContext
databinding
databinding is key in Silverlight
rich graphical capabilities
Graphics
Rectangle
Polygon
Line
Polyline
Path
Geometry
Ellipse
Text
Brushes
Effects
rich media capabilities
Video
• H.264
• WMV
• 1,2,3,A,VC-1
• VideoBrush
• Smooth
Streaming
• Playlists
• Markers
• DRM
• VC-1
• H.264
• On/Offline
Audio
• WMA
• 7,8,9
• MP3
• AAC
Imaging
• Image
• ImageBrush
• DeepZoom
• WriteableBitmap
Ink
Html
• WebBrowser
• HtmlBrush
in-box controls
Button
CheckBox
HyperlinkButton
RadioButton
RepeatButton
ToggleButton
AutoCompleteBox
PasswordBox
RichTextArea
Label
TextBlock
ValidationSummary
Image
MediaElement
MultiScaleImage
DataGrid
DataPager
ComboBox
ListBox
TabControl
TreeView
Calendar
DatePicker
ChildWindow
DescriptionViewer
Frame
GridSplitter
NotificationWindow
ScrollViewer
Slider
ToolTip
ViewBox
WebBrowser
Silverlight Toolkit controls
• CodePlex project with source code
DockPanel
WrapPanel
Accordion
LayoutTransformer
TransitioningContentControl
Expander
BusyIndicator
ButtonSpinner UpDown Controls Rating TimePicker Drag/Drop GlobalCalender
controls
controls are key in Silverlight
Silverlight
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
rich internet applications
firewall
network
network is key in Silverlight
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
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.