I need to show a silverlight webpart in sharepoint 2010.
This is my code, to show silverlight control
protected override void CreateChildControls()
{
Silverlight sl = new Silverlight();
sl.ID = "CustomWebPart1SL";
sl.Source = "/Silverlight/CustomWebPart.xap";
this.Controls.Add(sl);
}
In Silverlight I just hotcoded the data so the chart is rendering correctly in Sharepoint page.
The problem is I couldn't access Sharepoint list from silverlight application.
How to access the list and property-bag from silverlight application. Or how can I pass those datas as DataTable to silverlight from WebPart code.
And silverlight not supporting DataTable object. What is the reason.