First Look at Silverlight 2
page 3 of 4
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 19547/ 38

Silverlight 2 Tutorials: Building a Simple Digg Client

To help people come up to speed with Silverlight 2, I wrote a Silverlight application and put together a series of step by step tutorials that drill into and explain the different programming concepts behind it (controls, layout management, networking, data-binding, styles, user controls, templates, etc). I also added a tutorial post that demonstrates how to migrate the application outside of the browser and make it a desktop application using WPF and the full .NET Framework. 

Below are the pointers to the 8 tutorials I've put together:

Part 1: Creating "Hello World" with Silverlight 2 and VS 2008

Part 2: Using Layout Management

Part 3: Using Networking to Retrieve Data and Populate a DataGrid

Part 4: Using Style Elements to Better Encapsulate Look and Feel

Part 5: Using the ListBox and DataBinding to Display List Data

Part 6: Using User Controls to Implement Master/Details Scenarios

Part 7: Using Templates to Customize Control Look and Feel

Part 8: Creating a Digg Desktop Version of our Application using WPF

The application I've built the tutorials around is a simple search front end to the popular Digg.com site, and allows users to type in search topics and browse Digg stories that match them.

All of the UI in the application is built using Silverlight's WPF framework.  The application uses the Silverlight networking stack and cross-domain access support to query the Digg REST API directly, and uses LINQ and LINQ to XML to query/transform the returned data into DiggStory objects that I databind the UI against:

Figure 1

The application supports a master/details data interaction model that allows users to select stories from the search list and quickly drill into more details about them.  A user can jump to the Digg article directly from the details form, or close it and pick another story to drill into:

Figure 2

The entire application is implemented in about 35 lines of C# code and 75 lines of XAML page/user-control markup.  It only uses controls and libraries built-into Silverlight.

If you have used WPF before the UI concepts I discuss in the tutorial series will all be very familiar.  If you haven't used WPF before, the tutorials should provide a good overview of the fundamental programming concepts in it, and hopefully provide you with the basic knowledge necessary to start building Silverlight 2 applications with VS 2008 when Beta1 comes out.

I'll post details on my blog once Beta1 is available for download.  I'll also upload the final Digg application to my site (along with the code + project file to open and edit it in VS 2008) once Beta1 has shipped.

Hope this helps,

Scott


View Entire Article

User Comments

No comments posted yet.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-23 1:32:46 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search