我想将Silverlight上的内容放到HTML中可以实现吗 用HTML来做容器 ,注:网上找都是Silverlight嵌入HTML的 用silverlight来做容器的
当然可以,不过最好还是别用Silverlight了,不提供支持的
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source" value="/test.xap"/> <!--引入xap--> <param name="onError" value="onSilverlightError" /><!--监视应用是否正常运行,value对应js方法名--> <param name="background" value="white" /> <param name="minRuntimeVersion" value="4.0.50401.0" /> <param name="autoUpgrade" value="true" /> <param name="windowless" 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="获取 Microsoft Silverlight" style="border-style:none"/> </a> </object>
我引入了在一个Silverlight中生成的XAP文件怎么什么都没显示 F12看到是这些
<object width="100%" height="100%" data="data:application/x-oleobject;base64,QfXq3+HzJEysrJnDBxUISgAJAAB8bgAA2BMAAAwAAAB3AHIAaQB0AGUAAAAAAAAAAAAAAAAAAABMAAAAQwBsAGkAZQBuAHQAQgBpAG4ALwBTAGkAbAB2AGUAcgBsAGkAZwBoAHQAQQBwAHAAbABpAGMAYQB0AGkAbwBuADEALgB4AGEAcAAAADwAAAAAAAAAJgAAAG8AbgBTAGkAbAB2AGUAcgBsAGkAZwBoAHQARQByAHIAbwByAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAGAAAADUALgAwAC4ANgAxADEAMQA4AC4AMAAAAAoAAAB0AHIAdQBlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" type="application/x-silverlight-2">
<param name="source" value="ClientBin/SilverlightApplication1.xap">
<param name="onError" value="onSilverlightError">
<param name="background" value="write">
<param name="minRuntimeVersion" value="5.0.61118.0">
<param name="autoUpgrade" value="true">
<a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0">
<img style="" alt="获取 Microsoft Silverlight" src="http://go.microsoft.com/fwlink/?LinkId=161376">
</a>
</object>
可以了 原来样式那部分还要
支持