本文介绍了Silverlight 2侧栏小工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Vista侧栏小工具中显示Silverlight 2.0应用程序?每当我加载带有标准Silverlight 2对象标签的小工具时,都会获得no-silverlight默认内容而不是应用程序.那么,允许它运行的诀窍是什么?

How do you display a Silverlight 2.0 application in a Vista Sidebar gadget? Whenever I load a gadget with the standard Silverlight 2 object tag, I get the no-silverlight default content instead of the app. 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>

我是否可以在IE中使用会影响边栏的设置,以便允许Silverlight执行?

Is there a setting I can use in IE that affects the sidebar so it will allow Silverlight to execute?

即使我只能在计算机上运行它,这也是一个不错的开始.

Even if I can get it working just on my computer, that would be a good start.

推荐答案

似乎在Silverlight 2的发行版中,源参数已更改,并且必须是URI-请在Silverlight论坛中查看此线程: http://silverlight.net/forums/p/30968/99824.aspx

It seems with the release version of Silverlight 2 the source parameter changed and has to be a URI - see this thread from the Silverlight forums: http://silverlight.net/forums/p/30968/99824.aspx

这篇关于Silverlight 2侧栏小工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 15:17