Silverlight 3 Out of the Browser

Running a Silverlight application out of the browser is very powerful. This lets users install a Silverlight application locally with a quick right click on the app in the browser. In earlier versions of Silverlight this was still pretty easy, but now you don’t even have to open up an xml file to do it.

So here is my simple Silverlight application running in the browser.

InitialMessageInBrowser

After I click that Button the app makes a web service call to change the text, which isn’t that important to this demo. I figured it was better than having it do nothing.

AfterClickInBrowser

Hooray we have a working Silverlight application. Now in order to get it running out of the browser we have only a couple of steps to take. None of which involve going into the AppManifest.xml file like was required in previous versions. Now we simply right-click on the Silverlight project in Visual Studio and select Properties.

SilverlightProperties

After enabling the ability to run out of the browser you just need to change the Out-of-Browser Settings. Doing this will create a file in the properties folder of the Silverlight application which has XML defining all of the settings configured here. This GUI just makes it easy to set up.

OutOfBrowserSettings

I like how simple this is. Not overloaded with tons of options. Just easy to use.

Now when we run the app we can right-click on the application and we are able to install the app locally.

RightClickInstall

When we click on the Install option we get a nice installation wizard with no complexity.

InstallApp

All the user has to do is decide where to put a shortcut. Once they click this the app will be installed and running. The application will look a little bit like this.

InitialMessageOutOfBrowser

And when we click out button we get another web service call and this time we pass a different parameter to the service call and get a different message. Take a look.

AfterClickOutOfBrowser

So how easy was that? Say that the user wants to uninstall the application now. That is also easy. All they have to do is right-click on it and select the option to remove the app and it is gone. They can do this in or out of browser.

RemoveApp

So now you know how easy it is to set up an out of browser Silverlight application.

Comments