自己定制Silverlight在客户的的安装方式

你知道吗,其实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.}

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


点它就会跑到http://www.microsoft.com/silverlight 使用者可以自己安装并且选择。

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

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

 

 

posted on 2007-12-07 20:47  alex1984  阅读(392)  评论(1编辑  收藏  举报