we build an architecture that SharePoint will build the XML for us and write it on the page and Silverlight grabs the XML from the page and displays the images on the UI. How nice it is. You can get the first part i.e. get xml (image) data from the SharePoint libraries
Here, we are discussing about the code we need to place in Page.xaml.cs
file to read xml from web page.
string controlid = "divImgs"; //You can also use intiparams of Silverlight params to get the id.
string xmlstring = string.Empty;
if (controlid != null)
HtmlElement ctl = HtmlPage.Document.GetElementById(controlid);
if (ctl != null)
xmlstring = (string)ctl.GetProperty("innerHTML");