Creating a Silverlight 2 Application by Combining Expression Blend and Visual Studio 2008, Page 3
The Stages of the Application
To begin, you need to have the following tools installed on your machine. It can be either Vista or XP.
- Visual Studio 2008 SP1. Henceforth, I will refer to this as VS2008.
- Expression Blend 2 June 2008 Preview.
- Silverlight Development SDK Beta 2.
Open VS2008 and select New Project. Select Silverlight from the left-hand side and choose Silverlight application from the right-hand side. Make sure that you select .Net Framework 3.5 because you will be using LINQ and other new features of the .NET 3.5 SP1. Give it a name of your choice and then select a folder where the solution will reside. Name the solution ExpenditureSL.
Figure 4: Selecting the Silverlight template from Visual Studio 2008 SP1
Because Silverlight is a plug-in for the web browser, you will have to host this application inside a web application. So, VS2008 prompts you to create a simple HTML page or use a new web application to host this control. Select the first option and leave the default name as ExpenditureSLWeb. Once you are finished, click OK.
Figure 5: VS 2008 automatically creates a website to host your Silverlight application
Now, VS2008 will open the default page, Page.xaml. This is similar to a Windows Form and, because you are working with WPF, the default page is of type .xaml.
Figure 6: The default file type is Page.xaml when creating Silverlight/WPF applications
Because Silverlight 2 is a beta product, drag and drop isn't supported in VS2008 right now. You can drag and drop only in the code window and then see the preview. Support for WYSIWYG will be available only in the final version. At the time of writing this, the latest news is that Silverlight 2 will be officially released shortly. This demonstration is based on Silverlight 2 Beta 2. So, some features are likely to be changed in the final version.
That is all you have to do in Visual Studio 2008 SP1. You will focus on Expression Blend in the rest of this demonstration.