Enabling Out-of-Browser Support in Silverlight 3

March 18, 2009
No Comments.


One of the new features of Silverlight 3 that I wanted to play with first was the ability to create an Out-of-Browser experience. The Out-of-Browser feature remarkably different than Adobe AIR’s approach. From the user’s perspective, Out-of-Browser support in Silverlight 3 allows installation directly from the browser. For example, here’s an application that I built to support Out-of-Browser:


When you right-click the application, you get the opportunity to launch it out of the browser:


Launching out of the browser supports actually installing desktop and start menu items as well:


Once out of the browser, the title bar is shown appended with the source of the .xap file:


To support this, you simply need to change your AppManifest.xaml file (located in your Properties folder in Silverlight) to include the Deployment.ApplicationIdentity section:


  <!-- Uncomment the markup and update 
       the fields below to make your 
       application offline enabled -->
        ShortName="Out of Browser Silverlight Application"
        Title="This app is out of the browser!">
        Sample Out of the Browser App


You can also launch the app out of the browser using the App.Current.Detach(). You can also test to see if the application is running offline:

if (!App.Current.RunningOffline)

Adding Out of the browser support is that easy. What do you think?