[英]Silverlight 2 Sidebar Gadget
How do you display a Silverlight 2.0 application in a Vista Sidebar gadget? 如何在Vista边栏小工具中显示Silverlight 2.0应用程序? Whenever I load a gadget with the standard Silverlight 2 object tag, I get the no-silverlight default content instead of the app. 每当我加载带有标准Silverlight 2对象标记的小工具时,我都会获得no-silverlight默认内容而不是应用程序。 So, what's the trick to allowing it to run? 那么,允许它运行的诀窍是什么?
This is how I am currently trying to pull it off: 这就是我目前试图将其拉下来的方式:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Unicode" />
<title>Silverlight Test</title>
<style type="text/css">
body {
margin: 0;
width: 130px;
}
</style>
</head>
<body>
<object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="GTest.xap"/>
<param name="background" value="transparent" />
<param name="minRuntimeVersion" value="2.0.31005.0" />
<param name="autoUpgrade" value="true" />
<param name="windowless" value="true" />
Get Silverlight
</object>
</body>
</html>
Is there a setting I can use in IE that affects the sidebar so it will allow Silverlight to execute? 是否有我可以在IE中使用的设置影响侧边栏,因此它将允许Silverlight执行?
Even if I can get it working just on my computer, that would be a good start. 即使我能在计算机上运行它,这也是一个好的开始。
Just to clarify for future generations: 只是为后代澄清:
Changing the source value to "x-gadget://ClientBin/GTest.xap" did the trick. 将源值更改为“x-gadget://ClientBin/GTest.xap”就可以了。
似乎在Silverlight 2的发布版本中,源参数已更改并且必须是URI - 请参阅Silverlight论坛中的此主题: http : //silverlight.net/forums/p/30968/99824.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.