微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

SilverLight非托管代码的初始化进度条方法

SilverLight非托管代码的初始化进度条方法

<script type="text/javascript">
        ////错误处理函数
        function onSilverlightError(sender,args) ...

 

        //下载进度函数
        function onSourceDownloadProgressChanged(sender,eventArgs) {

            sender.findName("progresstext").Text = Math.round(eventArgs.progress * 100) + "%";
            sender.findName("progresstext2").Text = Math.round(eventArgs.progress * 100) + "%";
            sender.findName("progressBarScale").ScaleX = eventArgs.progress;
        }
    </script>

<body>

<div id="silverlightControlHost">
  <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
   <param name="splashscreensource" value="SplashScreen.xaml"/>
     <param name="onSourceDownloadProgressChanged" value="onSourceDownloadProgressChanged" />
     <param name="source" value="ClientBin/SlApp_System.xap"/>
     <param name="onerror" value="onSilverlightError" />
     <param name="background" value="Blue" />
     <param name="minRuntimeVersion" value="3.0.40818.0" />
     <param name="autoUpgrade" value="true" />
   <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0" style="text-decoration: none;">
        <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="获取 Microsoft Silverlight" style="border-style: none"/>
   </a>
  </object><iframe id="_sl_historyFrame" style='visibility:hidden;height:0;width:0;border:0px'></iframe></div>

</body>

 

SplashScreen.xaml

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐