First of all sorry for being late on starting this multipart blog series.

In this first part I will show you how to configure silverlight app for running OOB and also show you some basics of checking network availability and update availability from silverlight OOB application.

To configure silverlight app for running OOB,

Right Click Silverlight Project => Properties => Silverlight tab => check the checkbox “Enable running application out of browser” => Click the “Out of Browser Settings” button which will open new window with the same name.

Click the following image for larger view.

In this window some OOB settings can be configured and it will also add one “OutOfBrowserSettings.xml” file at Silverlight Project => Properties => OutOfBrowserSettings.xml.

This xml file reflects the settings made in “OutOfBrowserSettings” window and this settings can be written directly from xml file instead of window as shown in the image below.

Now I have created a simple UI as in image below for checking that application is running OOB or in browser and to chech whether network is available or not. Here “Install” button will be visible only if application is running In Browser.

Now to check network, I am using System.Net.NetworkInformation API and to check application mode (In Browser or Out of Browser), I am using System.Windows.Application API as shown in the code below.

Now clicking on “Install” button will open the Install Window as shown in the image below.

Clicking on “OK” button will install the silverlight app OOB on local system and then the app can be opened as normal windows application from desktop shortcut or from start menu.

Now if we open the application simultaneously in browser and OOB, then we can see the code running successfully as shown in the image below.

Code in the image shown below takes care of updates made in the application. This code checks for update in application and then together downloads the update as well for OOB application.

If any update (I have changed the Background colour here) found we can show the messagebox as shown below. To see the updates in OOB app, it needs to be restarted.

So this was the first part of silverlight OOB blog series. Hope you find it interesting and fill free to put comments and questions below.

For more info on silverlight, just go to, http://www.silverlight.net

For more on silverlight 4, click here, http://www.silverlight.net/getstarted/silverlight-4/

For more details on Silverlight 4.0, you can also browse through following blogs………

http://timheuer.com/blog/          —  Tim Heuer Blog – Silverlight Program Manager

http://blogs.silverlight.net/blogs/jesseliberty/       — Jesse Liberty Blog – Silverlight Program Manager

http://johnpapa.net/              —  John Papa website

http://adamkinney.wordpress.com/          — Adam Kinney Blog — For Silverlight graphics, interface and Expression Blend