【Silverlight】Silverlight Parameters

本文详细介绍了<object>元素中<param>元素的各项参数设置,包括source、onError、background等,这些参数对于Silverlight插件的初始化、错误处理及交互至关重要。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

The <object> element contains a series of <param> elements that specify additional options to the Silverlight plug-in.

source: A URI that points to the XAP file for your Silverlight application. This parameter is required.

onError: A JavaScript event handler that's triggered when a unhandled error occurs in the Silverlight plug-in or in your code. The onError event handler is also called if the user has Silverlight installed but doesn't meet the minRuntimVersion parameter.

background: The color that's used to paint the background of the Silverlight content region, behind any content that you display(but in front of any HTML content that occupies the same space). If you set the Background property of a page, it's painted over this background.

minRuntimeVersion: This is the minimum version of Silverlight that the client must have in order to run your application. If you need the features of Silverlight 3, set this to 3.0.40624.0(as silghtly earlier versions may correspond to beta builds). If Silverlight 2 is sufficient, use 2.0.31005.0.

autoUpgrade: A Boolean that specifies whether Silverlight should (if it's installed and has an insufficient version number) attempt to update itself. The default is true. You may set choose to set this to false to deal with version problems on your own using the onError event, as described in the "Creating a Friendly Install Experience" section.

enableHtmlAccess: A Boolean that specifies whether the Silverlight plug-in has access to the HTML object model. Use true if you want to be able to interact with the HTML elements on the test page through your Silverlight code.

initParams: A string that you can use to pass custom initialization information. This technique is useful if you plan to use the same Silverlight aplication in different ways on different pages.

splashScreenSource: The location of a XAML splash screen to show while the XAP file is downloading.

windowless: A Boolean that specifies whether the plug-in renders in windowed mode (the default) or windowless mode. If you set this true, the HTML content underneath your Silverlight content region can show through. This is ideal if you're planning to create a shaped Silverlight control that integrates with HTML content.

onSourceDownloadProgressChanged: A JavaScript event handler that's triggered when a piece of the XAP file has been downloaded. You can use this event handler to build a startup progress bar.

onSourceDownloadComplet: A JavaScript event handler that's triggered when the entire XAP file has been downloaded.

onLoad: A JavaScript event handler that's triggered when the markup in the XAP file has been processed and your first page has been loaded.

onResize: A JavaScript event handler that's triggered when the size of a Silverlight content region has changed.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值