Enabling Out-of-Browser Support in Silverlight 3


Url: http://wilderminds.blob.core.windows.net/downloads/myoutofbrowser.zip

Silverlight Logo

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:

outofbrowser_1

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

outofbrowser_2

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

outofbrowser_3

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

outofbrowser_4

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:

<Deployment 
  xmlns="http://schemas.microsoft.com/client/2007/deployment"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  
  <Deployment.Parts>
  </Deployment.Parts>

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

</Deployment>

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)
{
    App.Current.Detach();
}

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


Bootstrap 4 is Here!

After a long development cycle, Bootstrap has been completely re-written to improve performance and be more consistent. Learn Bootstrap 4 now with my Wilder Minds course:

Enroll Today


Shawn
Shawn Wildermuth
Author, Teacher, and Coach




My Courses

Wilder Minds Training
Vue.js by Example (Now Available)
Bootstrap 4 by Example
Intro to Font Awesome 5 (Free Course)
Pluralsight
Less: Getting Started (Coupon Available)
Building a Web App with ASP.NET Core, MVC6, EF Core, Bootstrap and Angular (updated for 2.1)
Using Visual Studio Code for ASP.NET Core Projects
Implementing ASP.NET Web API
Web API Design

Application Name WilderBlog Environment Name Production
Application Ver v4.0.30319 Runtime Framework x86
App Path D:\home\site\wwwroot\ Runtime Version .NET Core 4.6.27129.04
Operating System Microsoft Windows 10.0.14393 Runtime Arch X86