您现在的位置:路成软件 >> 服务与支持 >> 技术文章 >> Silverlight >> 正文内容

了解Silverlight 调用

点击数: 【字体: 收藏 打印文章 查看评论

    HTML 页面会调用 Default.html.js 源代码页中的 createSilverlight()  

Sys.Silverlight.createObjectEx({

source: "Scene.xaml",

parentElement: document.getElementById("SilverlightControlHost"),

id: "SilverlightControl",

properties: {

width: "100%",

height: "100%",

version: "0.9"

},

events: {

onLoad: Sys.Silverlight.createDelegate(scene, scene.handleLoad)

}

});

    该调用将用到许多属性,其中包括那些用于定义要呈现的 XAMLSilverlight 控件外观以及 onLoad onError 事件处理程序的属性。

    source:
标记。

    在页面上添加 Silverlight 控件时,应将该控件添加到命名 <DIV> 内。应将 parentElement:属性作为该 <DIV> 的名称。

    控件的 ID id:属性指定。

    控件的物理属性(如高度、宽度和版本)是由加载到 properties:属性中的数组设定的。

作者:msdn 来源:IT168 发布时间:2008年09月17日
相关信息
没有相关内容