How to show HTML content in silverlight
when i am trying to show the HTML content in silverlight using the HtmlHost control it shows me the warning popup.
"The HtmlHost control should always be used with a wind开发者_高级运维owless plugin. It cannot work reliably if this property is not specified"
How i can hide this warning popup
please help,thanks in advance.
Well, judging by the message you get, I would suggest setting the windowless mode property of your silverlight object to true.
Go to the html or aspx page where the silverlight object is created and add the property:
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/YourApplication.xap"/>
<param name="onError" value="onSilverlightError" />
<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="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
add the
<param name="windowless" value="true" />
to the 'yourprojectnameTestPage.html' and add
Silverlight.CreateObject(,,,{windowless:'bool'});
to silverlight.js
this two solves my problem cheers :) :)
精彩评论