Silverlight 2 Beta2

Silverlight Beta2 is officially out in the wild! 

logo

All the required download links to get started are here:

 

Also, for the feature areas I drive, here are the major Beta2 updates:

Networking

  • Wider API set for WebClient
    • Upload methods for streams and strings
    • Set request headers on uploads
  • Threading Updates
    • HttpWebRequest & WebClient are callable on a background thread
    • HttpWebRequest’s delegates are called on a new non-UI thread.
      • Delegates were previously always called on the UI thread.
      • You must invoke back on to the UI thread if the data you’re retrieving will be consumed by a UI element.
      • For an example, see the updated networking post series (part one).
  • Progressive download support
    • When AllowReadStreamBuffering is set to false on HttpWebRequest and WebClient, the returned request stream supports progressive Stream.BeginRead() calls.
  • Cross domain URI & path character restrictictions
  • Cross domain policy files
    • Cross domain policy files do not allow you to send request headers by default.  You must explicitly opt in to request headers in the policy file.
    • For more details, see this updated networking post series (part three).

Control Model Customization

  • Easier control subclassing when you don’t want to change control visuals
    • The DefaultStyleKey property indicates the type that should be used to look up the built-in style (e.g. MyButton.DefaultStyleKey = typeof(MyButton)
      • The runtime looks up the generic.xaml in the assembly where the DefaultStyleKey’s Type value was defined.
      • It also uses the DefaultStyleKey to look up the built-in style w/in that generic.xaml’s ResourceDictionary
    • DefaultStyleKey should be set in the control’s constructor
    • If you sub class Button and do not set the DefaultStyleKey, you will "inherit" the Button’s built-in style
  • Expansion of the Parts and States model with VisualStateManager
    • This is a big one!  Look for a new post coming soon explains how we’ve made control visual state & transition management easier.

3 comments

  1. > HttpWebRequest’s delegates are called on a new non-UI thread.
    surprised! the program which was running till yesterday stopped!!

    > For an example
    thank you.

    may I translate into Japanese and put on my blog about “Silverlight HTTP Networking Stack” part 1 to 3?
    (this is machine translation. I am sorry if it is strange English.)

  2. I met a problem when I implemented Silverlight 2 in my project.

    Description:

    A Live Search box will be shown after you input your keywords and click “GO”. Now the problems lie in that:

    1, The result box is displayed behind the Silverlight area; while in reality it is supposed to be displayed in front of the Silverlight. BTW: I set Silverlight area zindex=0 and Search result box zindex=65534 by default.

    2, When the result box is displayed behind the Silverlight, the user can still do some operation on the search result box in firefox browser while can not to do anything in IE browser.

    These two problems are to be tackled because they have now blocked my work. Maybe the silverlight must be show before all of element. I am eager for you help!

    Thanks,
    Dan

  3. I am having an issue with the Slider control. None of the MouseEvents are being raised. I am using a solution that I converted from Beta 1 to Beta 2. Any answers for me?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>