发布于 2016-05-31 00:25:51 | 142 次阅读 | 评论: 0 | 来源: 网友投递
Microsoft Silverlight
Microsoft Silverlight是一个跨浏览器的、跨平台的插件,为网络带来下一代基于.NET Framework的媒体体验和丰富的交互式应用程序。Silverlight提供灵活的编程模型,并可以很方便地集成到现有的网络应用程序中。Silverlight可以对运行在Mac或Windows上的主流浏览器提供高质量视频信息的快速、低成本的传递。
<div style="width: 662px;height: 622px" id="SilverlightControlHost" >
<script type="text/javascript"><!--
createsL( 'workflow.xaml' );
// --></script>
</div>
function createSL(xamlpage)
{
Silverlight.createObjectEx({
source: xamlpage,
parentElement: document.getElementById("SilverlightControlHost"),
id: "SilverlightControl",
properties: {
width: "100%",
height: "100%",
version: "1.1",
enableHtmlAccess: "true"
},
events: {
onLoad:OnLoaded
}
});
// Give the keyboard focus to the Silverlight control by default
document.body.onload = function() {
var silverlightControl = document.getElementById('SilverlightControl');
if (silverlightControl)
silverlightControl.focus();
}
}
public partial class workflow : Canvas
{
public workflow()
{
WebApplication.Current.RegisterScriptableObject("wpfe", this);
}
......
[Scriptable]
public event EventHandler workflowFunc;
}
function OnLoaded(sender,args)
{
sender.Content.wpfe.workflowFunc = onWorkflow;
}