Reader Level:
ARTICLE

What's New in Silverlight 5 - Introduction

Posted by Mohammad Elsheimy Articles | Silverlight with C# May 09, 2011
Step by step in Silverlight 5, lots of demos and samples available.
  • 0
  • 0
  • 5099

This content is based on a Beta release; expect many changes in the final release.

If you are new to Silverlight, check out this article.

What's New - XAML Changes.

Silverlight 5
 
The first thing to know about Silverlight 5 is that it's currently in beta, which means that it definitely has bugs, and it also is not yet feature-complete; some features are going to be shipped later in the final version. In addition, being in beta means that no go-live license is available; it is for internal use and testing only so do not install on a user's machine.
 
It is worth mentioning that Silverlight 5 was first announced at PDC 2010 conference (October 2010) and the beta version was shipped later at MIX11 (April 2011,) and the final version will be released soon this year.
 
Goal
 
Goals of the version 5 include:
  • Improving performance
  • Getting closer to WPF
  • Enabling line-of-business scenarios
  • Better development experience

Improvements
 
Silverlight 5 has come with lots of improvements and changes, and those improvements can be divided into several areas:
  • XAML Changes
  • Control and Text Improvements
  • Graphics and Media Changes
  • Elevated-Trust Changes
  • Performance and Other Improvements
Getting Started
 
To get started you need to first have Microsoft Visual Studio 2010 Service Pack 1 installed on you PC. After that, you can go to http://silverlight.net/ and download the beta SDK and tools for VS2010.
 
In addition, you can install Microsoft Expression Blend Preview for Silverlight 5 Beta if you like using it.
 
After you have VS2010 SP1 and Silverlight 5 SDK installed on your PC, you can continue reading and start making your cool stuff!
 
Now let's start with XAML changes, but first let's take a look at our model that's going to be used through all the samples.
 
Model
 
Our demos are based on a very simple model consisting of just a collection of paper books and audio books. We have the following business model:

public class Book
{
  public string Title { get; set; }
  public string Author { get; set; }
  public decimal Price { get; set; }
}

public class PaperBook : Book
{
  public string Isbn { get; set; }
  public int Pages { get; set; }
}

public class AudioBook : Book
{
  public TimeSpan Duration { get; set; }
}
 

And here's our collection:

public class BookData : List
{
    public List PaperBooks
    {
        get
        {
            return (from b in this
                    where b is PaperBook
                    select (PaperBook)b).ToList();
        }
    }

    public List AudioBooks
    {
        get
        {
            return (from b in this
                    where b is AudioBook
                    select (AudioBook)b).ToList();
        }
    }

public BookData()
  {
    this.Add(new PaperBook()
    {
      Title = "The Sixth Man",
      Author = "David Baldacci",
      Isbn = "9780446573108",
      Pages = 432,
      Price = 14.28m,
    });

    ...

    this.Add(new AudioBook()
    {
      Title = "Water for Elephants",
      Author = "Sara Gruen",
      Duration = new TimeSpan(11, 29, 00),
      Price = 21.56m,
    });
  }

What's next?

Start with:
  • XAML Changes
  • Control and Text Improvements
  • Graphics and Media Changes
  • Elevated-Trust Changes
  • Performance and Other Improvements

COMMENT USING

Trending up