There has been a talk around Windows 7 phone and so I thought I would start looking into Silverlight. So let's begin at the beginning: Silverlight is an add-on that allows the use of images, sound and video on various platforms such as Windows 7 phone or the web. Since the point of this really is to learn, I will be learning at the same time.
To Get Started with Silverlight, You Will Need the Following Tools
- Visual Studio 2010 (you can download the express version here)
- Expression Blend 2010
- Silverlight toolkit. These are the tools you will need for building apps for Windows phone as well as the general Silverlight tools that contain their controls.
Basics of Silverlight
Silverlight is primarily made of XAML and normal code. XAML stands for Extensible Application Markup Language. This resembles aspx webforms look and feel. You would define XAML objects and modify them in code.
Setting Up a Silverlight Solution
- Open Visual Studio 2010.
- Click on New Project.

- Select Silverlight application, and enter in your project name. In this case, I have selected “
Basic
”.

- Enter in the Web project name. By default, there will be a name based on the solution name: “
SolutionName.Web
”.

- This should build the solution and create a web project automatically. To start with, we will create a very simple form that changes the text of a label on a button click event.
- Click and drag a label and button onto the design surface, set the
Name
properties of both controls. To set the text field, you would need to change the Content
property.

- Setting events works in the same way as events in aspx webforms. Set the Event Handler on the control and create the event handler in the behind code.


- All that there is left to do is run the app.

I will continue going further into Silverlight each week so that we can learn the more advanced features.