Quantcast
Viewing latest article 4
Browse Latest Browse All 10

Whats new in Silverlight 5

Silverlight 5 adds over 40 new features over last Silverlight version.

For more information on the Silverlight 5 announcements check http://www.microsoft.com/silverlight/future.

Multiple Window Support

Multiple window support enables a trusted application to dynamically create additional top level
windows.

Ancestor RelativeSource Binding

Ancestor RelativeSource Binding enables a DataTemplate to bind to a property on the control that
contains it, equivalent to FindAncestor and AncestorType, AncestorLevel bindings in WPF.

Implicit DataTemplates

This feature enables the following capabilities:

  • ContentPresenter DataTemplates can be selected based upon the content type.
  • Implicit definition of DataTemplates
  • Dynamically update the ContentPresenter DataTemplate when its content changes
  • Enable proper scoping of DataTemplates

ClickCount

Enables Multi‐click input on left and right mouse button.

private void OnMouseDownClickCount(object sender, MouseButtonEventArgs e)

 

    {

 

        // Checks the number of clicks.

 

        if (e.ClickCount == 1)

 

        {

 

            // Single Click occurred.

 

        }

 

        if (e.ClickCount == 2)

 

        {

 

            // Double Click occurred.

 

        }

 

        if (e.ClickCount >= 3)

 

        {

 

            // Triple Click occurred.

 

        }

 

    }

 

Binding on Style Setter

Binding in style setters allows bindings to be used within styles to reference other properties.

<Style x:Key=”TextBlockStyle2” TargetType=”TextBlock”>
<Setter Property=”FontFamily”
    Value=/SL5;Component/Fonts/Fonts/.zip#Segoe UI/>
<Setter Property=”FontSize” Value=”0,3,0,0”/>
    <Setter Property=”Foreground” Value=
”{Binding Source={StaticResource SysColors},Path=ControltextBrush}”/>
</Style>

Realtime Sound (low‐latency Audio)

Enables pre‐loading of an audio source for precision timing of playback. Multiple playback instances are supported through creation of SoundEffectInstance objects.

Variable Speed Playback (“Trick Play”)

This API enables development of fundamental player experiences such as fast‐forward and rewind and

variable speed playback at common speeds (1.2x, 1.4x) – a very common scenario for enterprise training content. The MediaElement.Rate  property supports the values ‐8.0, ‐4.0, 0.5, 1, 4.0, 8.0. Note : AudioPitch correction is not present in the Beta but will be added for the final release

Additional Silverlight 5 Features included

  • Hardware video decode for H.264 playback.
  • Multi‐core background JIT support for improved startup performance.
  • ComboBox type ahead with text searching.
  • Full keyboard support in full‐screen for trusted in‐browser applications, enables richer kiosk and

    media viewing applications in‐browser.

  • Default filename in SaveFileDialog – Specify a default filename when you launch the

    SaveFileDialog.

  • Unrestricted filesystem access – trusted applications can Read write to files in any directory on

    the filesystem.

  • Improved Graphics stack – The graphics stack has been re‐architected to bring over

    improvements from WP7, such as Independent Animations.

  • Performance optimizations
    • XAML Parser performance optimizations.
    • Network Latency optimizations.
    • Text layout performance improvements.
    • Hardware acceleration is enabled in windowless mode with Internet Explorer 9.

Viewing latest article 4
Browse Latest Browse All 10

Trending Articles