A Simple example of getting remote XML into SIlverlight and Bind to a control

I have played around with Silverlight a little, and I realise there are some shifting changes going on ready for the release of Silverlight 2.0.

Some examples seemed to show getting data back to Silverlight to bind to say combo boxes/listboxes etc...
I can see examples using web services, although I cannot use that method.

I need an example to show the "plumbing" of getting remote XML back to Silverlight using VS2008 or Blend 2.
I have an ASP.NET ASHX page which simply returns an XML string, and I want to use that XML in silverlight.

I also want to do the reverse and send data back to the server... but that can wait if necessary.
Who is Participating?
adler77Connect With a Mentor Commented:

This sample is a bit old (some of the Silverlight in it may be a bit out-of-date) but the most important thing here is the C# that it uses is still good. It takes an XML document (an RSS feed, actually) and uses it to dynamically create XAML. You may not be creating the XAML with ASP.NET, but all but the last three lines in the Page_Load handler deal with getting an XML document and passing it to a function. From there, the function (GenerateXaml in the example) has the rest of the work (getting info from the XML doc). From there, you can use that data as you would any other string.
davidsheardownAuthor Commented:
Hey thanks.. I did come across this example a week or two back, although sort of dismissed it because, as you mentioned, it seemed to just create XAML... obviously I didn't look closer!

Thanks for this!
All Courses

From novice to tech pro — start learning today.