As I mentioned a couple of weeks ago, learning Silverlight is a lot more about relearning some basic assumptions than it is about learning a new language. We’ve already looked at the basic layout managers available and how that impacts putting a screen together. Today we want to look at how we can capture events and access the controls from our CSharp code.
Last week I demonstrated how to access data from a web service in Silverlight and display it on the page. Today we are going to continue on with that demo and look at how to navigate through our data.
As I’ve stated in previous posts, Silverlight doesn’t work quite the same way as we are used to in ASP.NET or in Windows Forms. But if you’ve been following along, you’ve seen that much for yourself.
In the last several posts, I’ve demonstrated various ways of getting data onto the screen. What I’ve purposely omitted up until this point is how to update this information.
So let’s start by going back to the demo we created in Febuary.
What we ended up with is an application that would display the First name and the last name out of the Person class.
What we want to do today is to update the code so that the person class gets its data from a database on the server using a web service. So the first thing we’ll want to do is create a web service.
I sat down today to learn about using Silverlight and Dataset from a Web Service. Something you’d think would be rather trivial.
I mean, seriously folks. We use Datasets as a means of transporting data up and down the tiers of just about everything we do in .NET. It would stand to reason that using DataSets as our transport mechanism in Silverlight would be a given.
One of the toughest things to get your head around in Silverlight is Internationalization and Localization. But once you figure out the quirks and the parts that are missing in Visual Studio 2008, it’s not that bad.
In this post I hope to explain step by step what you need to do to have this work reliably and share some of the mistakes I made along the way.