MIX’09 – Reviewing – What’s New in Silverlight 3.0

Joe Stegman – Group Program Manager

 

Silverlight 3.0 Tooling

  • Visual Studio 2008 Tools for Beta and RTM
    • Include improved XAP Compression
      • 10-30% decrease in XAP size
    • Interactive designer
      • In next Visual Studio release
      • See Visual Studio 2010 session for details
  • Expression Blend 3 Preview
    • Final Release “later this year”
    • See Blend session for details

 

H.264/AAC/MP4

  • Silverlight 3 supports H.264/AAC/MP4
  • Industry standard format:
    • Hardware decoders on most devices
    • YouTube, iPhone, Flash supported format
    • Base format for QuickTime and iTunes
  • Silverlight 3 H.264 vs VC1
    • DRM (only available for VC1)
    • Windows Media Server (only available for VC1)

GPU Acceleration

  • Opt-in feature on Silverlight 3 plug-in
    • Enabled final surface draw with the GPU
  • Opt-in feature per Element
    • Use GPU to blend/composite multiple Elements
    • Use GPU to stretch elements
  • Works in-browser and in full-screen mode
  • Where can we see this?
    • Performance is highly enhanced

 

Prespective 3D

  • Prespective 3D
    • Put a 2D objects in 3D space
      • Threat a 2D object as if it was in a 3D space
      • Not really 3D
      • Example:

                                      <Border>

                                        <Border.Projection>

                                            <PlaneProjection x:Name=”p3”/>

                                        </Border.Projection>

                                        <MediaElement Source=”Robots.wmv” Stretch=”Uniform” Width=”480”/>

                                      </Border>

    • X,Y,Z rotation and X,Y,Z rotation point
      • Enabled the rotation of the 2D element on 3D Space based on the position or by placing the rotation on a specific point
      • Properties for the Projection Element, that in this case is PlaneProjection:
        • Rotation
          • RotationX
          • RotationY
          • RotationZ
        • Rotation Point (changes the center of rotation)
          • CenterX
          • CenterY
          • CenterZ
    • Support Local/Global X,Y and Z offsets
    • Works not just with media but also with any other objects without losing the functionality

 

Animation Easing

    Making animations easier and less mechanic, and based on the known standards this was placed inside the platform.

  • Added stock animation easing functions
    • CircleEase, SineEase, BackEase
    • ExponentialEase, PowerEase
    • QuadraticEase, CubicEase
    • QuarticEase, QuinticEase
    • ElasticEase, BounceEase
  • Simplifies creation of new easing functions
  • Inside the Animation we now have a EasingFunction Property that defines the used EasingFunctions

               <DoubleAnimations … >

                    <ExponentialEase EasingMode=”EaseOut” Exponent=”10”/>

                </DoubkeAnumation

 

Save File Dialog

  • For security reasons there is never informations about the file localization and so on, just the Stream for the file and no more than that.
  • As the SaveFileDialog and OpenFileDialog that is used in Windows Forms we can filter the extension that we allow used in the SaveFileDialog

 

Effects and Pixel Shaders (version 2.0)

  • A complete set of effects that have been placed inside the framework and that can be easily used
    • Example:

                         BlurEffect blur = new BlurEffect();

                         blur.Radius = 8;

                         this.LayoutRoot.Effect = blur;

  • Effects
    • Impact the visual behavior and not functional behaviour
    • Silverlight 3 supports Blug and Drop Shadow
  • Silverlight 3 supports custom “Effects”
    • Custom “effects” are implemented as “shaders”
    • Shaders typically authored using HLSL
      • Compiled into byte code using DX SDK utility
      • Silverlight 3 consumes the byte code
      • This shaders are also compatible with any Browser and Operation System
    • Shaders allow developers to modify each pixel on a UI element before the pixel in rendered
    • Shader = a per-pixel function or operation
  • Due to security issues right now it’s not GPU accelerated

Pixel APIs

  • Two Parts
    • Dynamic bitmap generation
      • Read/write pixel in a bitmap
    • Render a visual tree (elements) to a bitmap
  • Scenarios:
    • Dynamic image generation (example: RT graphs)
    • Image Editing and effects
    • Clone Visuals
      • Examples: reflections, drag effect

 

Raw Audio/Video APIs

  • Similar to Pixel APIs but for audio/video
  • Scenarios
    • Dynamic sound generation
    • Custom audio/video decoders
  • Imagine doing effects on top of Video, like Drag and Drop, easily

 

Note: Silverlight Media doesn’t support an Alpha Key in the Video itself, and so we can use the Chroma Key to use with Shaders.

 

Local Messaging

  • Cross plug-in Silverlight communication
    • Multiple plug-ins on the same page
    • Multiple plug-ins on different browsers tabs
    • Multiple plug-ins in difference browsers
  • Implementation
    • Shared Memory
    • Exposed as “named pipes”
    • String based messages
    • Secure because they are:
      • By Default
        • Can only talk to other plug-ins that came from the same domain
        • Based on an Handle
      • Can be extended by the developer
  • Scenarios
    • Mixed HTML and Silverlight Architecture

 

UI Framework Improvements

  • Merged Resource Dictionaries
  • BasedOn Styles
  • Styles can be “cleared” (changed in runtime) – This means that we can re-arrange every style on runtime and do something like skinning
  • Multi-select ListBox
  • Listening to “handled” routed events
  • New VSM “Invalid States”
    • Supported in TextBox, CheckBox, ComboBox, ListBox, RadioButton
    • Provides elements like TextBox validation error definition

 

Other Improvements

  • SystemColors
    • If we are in High-Contrast Mode this rather that what happens in Silverlight 2.0 will not only inform us of that, but also use the System Colors in order to present elements in the correct form
  • SaveFileDialog
  • Text Improvements
    • ClearType Text (Post Beta)
    • CaretBrush
    • Flag to optimizing for animating text
      • Makes smooth animations to text
    • Glyphs support for system fonts
      • Important for East Asian Scenarios
  • Image Refinements
    • Possibility to bypass the cache
    • Several other

 

New SDK Controls

 

Other Big Additions

  • Business Solutions
    • Navigation Framework
    • Data Control Additions
    • SEO (Search Engine Optimization) Support
    • N-Tier data Support ( .NET RIA Services)
  • Web Services Stack Improvements
    • Binary XML, SOAP Faults, Credentials
  • Silverlight Toolkit

 

“Out-of-Browser”

  • Silverlight runs “Out of the Browser” (still sandboxed)
    • Now new surface area, just the same restrictions as the normal Silverlight in the Browser
  • Built into the core Silverlight runtime
  • Enabled per “application”
    • Manifest update
  • User Gesture to take “out of the browser”
    • Right click support
    • Custom Button in the application
  • New networking API’s
    • Connected
    • Disconnected
    • Changed State
  • Offline APIs
    • Launch state (Imported to detect if it was launched Online or Offline)
    • Update APIs (Update Management like the Normal Web Application, or in other words, automatically)
  • Installation to “Out of the Browser"
    • Install button can be changed and defined entirely by the developer
    • Change the Manifest and define the Deployment.ApplicationIdentity Part
    • This can only be programmatically, but this has to be based on a user Gesture like a click or something else, and just by calling:
      • Application.Current.Detach();
      • Application.Current.RunningOffline will inform if the application is running Offline
    • The Icon of the Installation Box is customizable

 

Backward Compatibility with Silverlight 2.0 is granted in Silverlight 3.0.

This is an extremely important version for Silverlight and to be used as a real LOB Application technologies because it provides the same approach to Web and Desktop applications.

Improvements in Isolated Storage Performance.

Local Communications between InBrowser and Out-Of-Browser applications are also possible.

No Comments