Using "createObject()", SL content isn't shown
-
Monday, June 20, 2011 7:08 AM
Hello, is that my page (html code) I've added a block of js code that creates and displays Silverlight content, as shown in the following code:
Silverlight.createObjectEx({ source: "MainPage.xaml", parentElement: document.getElementById("silverlightpluginhost"), id: "slplugin", properties: { width: "100%", height: "100%", background: "white" }, events: { onLoad: handleLoad }, context: null });
But when i load the page in the webbrowser, only is displayed the html object but not the SL content (for example: an ellipse and a button) which the XAML contains.Regards
All Replies
-
Tuesday, June 21, 2011 11:21 PM
Hi,
The source should be a xap file which was built by VS or Silverlight compiler.
Follow this document please:
http://msdn.microsoft.com/en-us/library/cc265155(v=vs.95).aspx
-
Wednesday, June 22, 2011 6:27 AM
Hi, i could understand that; only I can assign a file if this is a .XAP reference but if it's XAML, i've to assign a reference DIV.
Thanks for your help.
Regarss

