Import the System.Web.UI.SilverlightControls to use the silverlight control.
Create the object of Silverlight control and specify the path of .xap file. Add this control in web part.
Silverlight silverlightControl = new Silverlight();
silverlightControl.ID = "DemoId";
silverlightControl.Source = "~/_layouts/1033/Demo.xap";
silverlightControl.Width = Unit.Percentage(100);
silverlightControl.Height = new Unit(400);
silverlightControl.AutoUpgrade = true;
this.Controls.Add(silverlightControl);
No comments:
Post a Comment