XAP files for silverlight 4
Can you imbed silverlight 4 xap files into an aspx page and 开发者_如何学JAVAthen view them in vs 2008? If so how do you do this? Any sample code would be appreciated.
Thanks!
Sure, why not? Simply add the XAP to your ASP.NET web project and add an tag to your ASPX. Here's the basic embed for a Silverlight app:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/MyApp.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object>
精彩评论