Click here to Skip to main content
15,887,746 members
Articles / Silverlight

Beginning a Silverlight Journey

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
23 Nov 2010CPOL2 min read 9.9K   2   3
Beginning a Silverlight journey

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

  1. Visual Studio 2010 (you can download the express version here)
  2. Expression Blend 2010
  3. 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.

    Image 1

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

    Image 2

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

    3

  • 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.

    4

  • 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.

    5

    6

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

    7

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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 5 Pin
WebMaster6-Dec-11 2:09
WebMaster6-Dec-11 2:09 
GeneralNice Article for a newbie Pin
Ashish Kumar Mukherjee23-Nov-10 18:14
Ashish Kumar Mukherjee23-Nov-10 18:14 
GeneralRe: Nice Article for a newbie Pin
stephen.vaubell28-Nov-10 22:17
stephen.vaubell28-Nov-10 22:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.