您是否可以强制Silverlight仅运行浏览器外?

您是否可以强制Silverlight仅运行浏览器外? 编辑:我问的原因是因为很多Silverlight的功能只适用于OOB。如果我的应用程序依赖于此,我需要要求Silverlight应用程序以该模式运行或选择其他内容。     
已邀请:
如果在你的
Application_Startup
中使用它甚至在App.Xaml.cs中: -
private void Application_Startup(object sender, StartupEventArgs e)
{

     if (IsRunningOutOfBrowser)
     {
          this.RootVisual = new MainPage();
     }
     else
     {
          this.RootVisual = new PleaseRunOOB():
     }
}
现在创建一个名为
PleaseRunOOB
的非常简单的UserControl,向用户呈现安装和/或运行应用程序的OOB版本的neeed。     
来自http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2010/03/15/silverlight-4-quick-tip-out-of-browser-improvements.aspx 新的OOB模型存在的附加功能是不能从网页(如版本3)安装应用程序,而是从命令行(具有XAP文件可用)安装应用程序。 Silverlight 4 OOB启动程序具有新的命令行参数,可以在“仿真模式”下安装,卸载和执行应用程序 - 无需安装。 例如。要在桌面上安装应用程序,请使用以下命令:
"%ProgramFiles(x86)%Microsoft Silverlightsllauncher.exe" /overwrite /install:"X:PACKAGE_LOCATIONSL4Features.WebClientBinAPPLICATION.xap"
/origin:http://ORIGINAL_LOCATION/ORIGINAL_HOSTING_PAGE /shortcut:desktop
要卸载它,请使用以下命令:
"%ProgramFiles(x86)%Microsoft Silverlightsllauncher.exe" /overwrite /uninstall:"X:PACKAGE_LOCATIONAPPLICATION.xap"
/origin:http://ORIGINAL_LOCATION/ORIGINAL_HOSTING_PAGE /shortcut:desktop
要在不安装应用程序的情况下运行应用程序(在仿真模式下),请使用以下命令:
"%ProgramFiles(x86)%Microsoft Silverlightsllauncher.exe" /overwrite /emulate:"X:PACKAGE_LOCATIONAPPLICATION.xap" /origin:http://ORIGINAL_LOCATION/
    

要回复问题请先登录注册