340 likes | 458 Vues
Silverlight 5 Beta Features Overview. Alex Golesh, Senior Architect, Sela Group alexg@sela.co.il http://blogs.microsoft.co.il/blogs/alex_golesh. Agenda. Introduction What is Silverlight? Tooling New Features Line of Business (LOB) Out of Browser (OOB) General Improvements Q&A
E N D
Silverlight 5Beta Features Overview Alex Golesh, Senior Architect, Sela Group alexg@sela.co.il http://blogs.microsoft.co.il/blogs/alex_golesh
Agenda • Introduction • What is Silverlight? • Tooling • New Features • Line of Business (LOB) • Out of Browser (OOB) • General Improvements • Q&A • Summary
What is Silverlight? • Client Side RIA Application • Browser Plug-In • Cross-platform, cross-browser, cross-device
What is Silverlight? • Browser Plug-In: Silverlight Runtime • .NET programming model • Vector UI: Text, Graphics, Animation • Doesn’t requires .NET on client machine • .NET development platform • ASP.NET Integration
Silverlight .NET Subset • .NET for Silverlight is a factored subset of full .NET • .NET 3.5 ~200 MB (Windows only) • Desktop ~50 MB (Windows only) • Silverlight ~4 MB (cross platform) • Same APIs, tools and skills • Highly compatible • Moving from Silverlight to desktop .NET with minimal changes • Source, but not binary compatible
Presentation Core – Graphics • 2D Graphics • Vector based • Standard shapes and Paths • Transformations: skew, rotate, scale, translate, matrix • 3D Graphics • Similar to XNA • Hardware Accelerated • Animation Basics • Time-based • Support linear, discrete and spline animation • Animations and graphics can be defined using XAML or code
Extensive Application Markup Language Declarative Programming - XAML XAML C# VB.NET <Button Width="100"> OK <Button.Background> LightBlue </Button.Background> </Button> Button b1 = new Button(); b1.Content = "OK"; b1.Background = new SolidColorBrush(Colors.LightBlue); b1.Width = 100; Dim b1 As New Button b1.Content = "OK" b1.Background = New _ SolidColorBrush(Colors.LightBlue) b1.Width = 100 • Toolable, declarative markup • Code and content are separate • Compatible with Windows Presentation Foundation
Controls • Core controls in box • Button, ListBox, CheckBox, RadioButton, Hyperlink, Slider, ScrollBar , ScrollViewer , ProgressBar , TextInput, etc. • Core layout containers in box • Grid, Stack panel, Canvas, etc. • Other controls shipped as extensions • DataGrid, Menus, ToolBar , etc.
Styling and Templating support • Controls supports styling • Controls supports templating
Introduction • Introduced at MIX11 • Tooling – Visual Studio 2010 SP1 & Blend 4 (special build) • XAML Debugging • Target LOB • Postscript Printing • Implicit Data Templates & Relative Binding Source • Trick Play • Improves OOB/IB model • Elevated trust IB model • Developer only release
Tooling • Visual Studio 2010 SP1 • Improved Intellisense • XAML Debugging • Profiler • Expression Blend Preview for Silverlight 5
Line Of Business Applications – New Features • Ancestor RelativeSource support in DataBinding • Implicit Data Templates • Custom Markup Extensions • Style Setters Binding
Ancestor Binding • Bind to ancestor control • Ancestor definition by • Type • Level • Mode
Implicit Data Templates • DataTemplate definition based on type • No x:Key means default • Generates default UI for specified type • Can be overridden in by specific DataTemplate
Custom Markup Extensions • Class derived from System.Windows.Markup.MarkupExtension • Override one function • ProvideValue • Only parameterless constructor is supported • Positional parameters are not supported (unlike in WPF) • Built-in • x:Null
Style Setters Databinidng • Setters value can be databound • Converters works
Out Of Browser • Full file system access • Elevated OOB only • Read/Write permissions of current user • Multiple Child Windows • p/Invoke • Post Beta
Multiple Child Windows • Span multiple tear-off windows • Elevated Out-Of-Browser applications only • System.Windows.Window class • Window Style • Window State • Window Size and Location • Width, Height, Left, Top • Content accepts FrameworkElement
In-Browser elevated mode • Works like Out-Of-Browser Elevated Mode • Requires XAP signing with certificate in Trusted Publishers store • Requires registry key • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Silverlight\ • AllowElevatedTrustAppsInBrowser = 0×00000001
Additional Features • ClickCount • Part of MouseButtonEventArgs • Realtime Sound • Uses XNA’s SoundEffect • Linked Text Containers • TrickPlay • Text Tracking and Leading • CharacterSpacing property • ComboBox type ahead Searching
Linked Text Containers • Enables to flow long text into overflow container • Very usable for print layouts • Enables magazine and newspaper-style layouts
Trick Play • Enable speed up/slow down video speed • Pitch correction (after Beta) • Controlled by PlaybackRate property of MediaElement
Summary • Available starting April 2011 • Beta Developer release, without “Go-Live” • LOB Ready • Many Improvements