Expression Blend and Silverlight

KingBel

Expert Member
Joined
Dec 30, 2010
Messages
2,349
Reaction score
96
Location
Pretoria East
Hi Guys,

I am trying to create a animated Silverlight banner in Expression Blend. However, I would like the settings for the banner to be read from an external xml file each time it is loaded (i.e. image path, description, link etc). How do I go about doing this in Blend?

I can create the banner with no problem, but I am stuck at getting the data from the XML file on each onLoad event.

Your help is greatly appreciated :)
 
That is outside the scope of XAML and thus can't be done in XAML. You will need to get the xml data using C# (VB.Net) and then bind it. Bindings are quite powerful in XAML so it would be easy to do it that way.
 
Thanks. Quick additional question: Would I be able to use a Sharepoint list instead of a xml file for my parameters as well? I suppose that if I can code the data extraction with C#, it should then be possible? Now I just need to learn C# :)
 
Last edited:
Thanks. Quick additional question: Would I be able to use a Sharepoint list instead of a xml file for my parameters as well? I suppose that if I can code the data extraction with C#, it should then be possible? Now I just need to learn C# :)

If you have access to the SharePoint list, then yes, using the SharePoint Client objects. Simple enough in SP 2010, at least. You do need to know C# though. ;)

BTW, you may find this series interesting: 31 days of Silverlight
 
Remember to keep in mind that SL is client side and you would read the XML server side.
Lotsa people seem to forget that.

What I would recommend is hitting a WCF service or handler on load of the SL and read in XML from that.
So it doesn't really matter to your SL where the server is generating the data from.
 
Top
Sign up to the MyBroadband newsletter
X