Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you force Silverlight to only run Out-of-browser?

Can you force Silverlight to only run Out-of-browser?

EDIT: The reason I'm asking is because a lot of Silverlight's functionality only works OOB. If my application depends on this I need to either require the Silverlight app to run in that mode or pick something else.

like image 677
Jonathan Allen Avatar asked Apr 05 '11 18:04

Jonathan Allen


People also ask

How do I use Silverlight without Internet Explorer?

If a Silverlight applications provides out-of-browser support, you can right-click and select the install option. This adds a shortcut to your desktop or Start menu. You can then use this shortcut to start the application without having to open a browser and navigate to the application's Web site.

Will Silverlight still work after end of life?

Silverlight's license is a perpetual license and is not tied to the continuation of support. While support will be ending in October 2021, this date does not affect the license, which continues in effect for as long as the customer is using the software and complies with the terms of the license.

Why was Silverlight discontinued?

The Mono Team abandoned development of Moonlight, a free and open-source implementation of both the Silverlight 1 and 2 runtimes. Development was discontinued in 2012 due to the poor acceptance of Silverlight and the restrictions imposed by Microsoft.


2 Answers

How about using this in your Application_Startup even in App.Xaml.cs:-

private void Application_Startup(object sender, StartupEventArgs e)
{

     if (IsRunningOutOfBrowser)
     {
          this.RootVisual = new MainPage();
     }
     else
     {
          this.RootVisual = new PleaseRunOOB():
     }
}

Now create a very simple UserControl called PleaseRunOOB to present to the user the neeed to install and/or run the OOB version of the app.

like image 194
AnthonyWJones Avatar answered Nov 06 '22 20:11

AnthonyWJones


from http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2010/03/15/silverlight-4-quick-tip-out-of-browser-improvements.aspx

Additional feature exist with new OOB model is ability to install application not from the web page (like it was from version 3), but from command line (having XAP file available). Silverlight 4 OOB launcher has new command line parameters to install, uninstall and execute application in “emulation mode” – without installing it.

For example. to install application on the desktop use the following command:

"%ProgramFiles(x86)%\Microsoft Silverlight\sllauncher.exe" /overwrite /install:"X:\PACKAGE_LOCATION\SL4Features.Web\ClientBin\APPLICATION.xap"
/origin:http://ORIGINAL_LOCATION/ORIGINAL_HOSTING_PAGE /shortcut:desktop

To uninstall it use the following command:

"%ProgramFiles(x86)%\Microsoft Silverlight\sllauncher.exe" /overwrite /uninstall:"X:\PACKAGE_LOCATION\APPLICATION.xap"
/origin:http://ORIGINAL_LOCATION/ORIGINAL_HOSTING_PAGE /shortcut:desktop

To run application without installing it (in emulation mode), use the following command:

"%ProgramFiles(x86)%\Microsoft Silverlight\sllauncher.exe" /overwrite /emulate:"X:\PACKAGE_LOCATION\APPLICATION.xap" /origin:http://ORIGINAL_LOCATION/
like image 44
nathan gonzalez Avatar answered Nov 06 '22 21:11

nathan gonzalez