Re: Passing InitParams through the <OBJECT> tag...
Can you show us the code that you wrote?
If you read this "Instantiating a Silverlight Plug-In (Silverlight 2) " from Silverlight doc, you should be able to pass the initparams through the <OBJECT>
I just tested it. It is working fine..
SilverlightApplication8TestPage.html
<body>
<!-- Runtime errors from Silverlight will be displayed here.
This will contain debugging information and should be removed or hidden when debugging is completed -->
<div id='errorLocation' style="font-size: small;color: Gray;"></div>
<div id="silverlightControlHost">
<object data="data:application/x-silverlight," type="application/x-silverlight-2-b1" width="100%" height="100%">
<param name="source" value="ClientBin/SilverlightApplication8.xap"/>
<param name="onerror" value="onSilverlightError" />
<param name="background" value="white" />
<param name="initParams" value="color=white" />
<a href="http://go.microsoft.com/fwlink/?LinkID=108182" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
</a>
</object>
<iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
</div>
</body>
App.xaml.cs
private void Application_Startup(object sender, StartupEventArgs e) {
this.RootVisual = new Page();
var color = e.InitParams["color"];
}
(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)
Best Regards,
Michael Sync
Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed