MSDong's Space

A place for me to talk about silverlight and web,because my friends and family isn't interesting in...

博客园 首页 新随笔 联系 订阅 管理

使silverlight自动安装到客户端

There are two ways to install Silverlight client.One is installed directly, and the other is indirect.
When you use Silverlight founded a Web site or program, you can use the "inplaceInstallPrompt" Attribute to Custom when build objects.
Samples:

Silverlight在客户端的安装方式有间接和直接.
当使用Silverlight建立了网站或者程序的时候,
可以用“inplaceInstallPrompt"属性在建立对象的时候来进行定制。

范列:

function createSilverlight()
{ Sys.Silverlight.createObject( 
 "plugin.xaml", // Source property value.
 parentElement, // DOM reference to hosting DIV tag.
 "myControl", // Unique control id value. 
{ // Control properties. 
 width:'1024', // Width of rectangular region of control in pixels. 
 height:'530', // Height of rectangular region of control in pixels.  
 inplaceInstallPrompt:false, // 設定客戶端安裝的方式.  
 background:'white', // Background color of control. 
 isWindowless:'false', // Determines whether to display control in Windowless mode. 
 framerate:'24', // MaxFrameRate property value. 
 version:'0.9' // Control version to use. 
 }, 
 { 
 onError:null, // OnError property value -- event handler function name. 
 onLoad:null // OnLoad property value -- event handler function name. 
 }, 
 null
 ); // Context value -- event handler function name.}


Such settings as above in the client -->

像上面这种设定在客户端的表现为
 



Click it,it will go to the http://www.microsoft.com/silverlight Users can choose and use by themselves.
If you want to use direct mode ,set inplaceInstallPrompt to true. There will be happening as the following graphics -->
点它就会跑到http://www.microsoft.com/silverlight 使用者可以自己安装并且选择。

如果想使用直接安装模式就把inplaceInstallPrompt设置为true。就会出现以下图形



Here you click it is installed directly, for those who do not know how to use computers.

在这里你点它就是直接安装了,适合不懂电脑的人士使用。

posted on 2007-12-08 14:21  MSDong  阅读(2236)  评论(0)    收藏  举报