Click here to Skip to main content
12,550,379 members (46,172 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


4 bookmarked

Silverlight 3 Out of browser

, 22 Sep 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
Silverlight is now in its third version. Among the many new features in this version is out of browser support. For developers enabling out of browser can be as simple as clicking a button in visual studio or via a menu in blend 3.

In its third version Silverlight finally has out of browser support. This allows developers to easily create a desktop and web application with one set of code. Not only does this provide a productivity increase for developers it also provides a better user experience for the end user and options such as offline support.

The following new properties were added to simplify out of browser support.

1: //Check for updates and download and install.
2: Application.Current.CheckAndDownloadUpdateCompleted += new CheckAndDownloadUpdateCompletedEventHandler(Current_CheckAndDownloadUpdateCompleted);
3: Application.Current.CheckAndDownloadUpdateAsync();
5: //Is your application running OOB
6: bool IsOOB = Application.Current.IsRunningOutOfBrowser;
8: //Network status
9: bool IsConnected = NetworkInterface.GetIsNetworkAvailable();

Mostly these are just basic static properties but something as simple as knowing whether or not the network is available will make providing automatic offline data caching a possibility.

Also an asynchronous method “Application.Current.CheckAndDownloadUpdateAsync” will automatically check to see if the clients application is up to date. Microsoft has left it up to the developer to determine when and where this check is performed. This method browses to the originating URL and looks for differences in the XAP file. If a difference is found it will automatically download and install the latest version and when complete raise an event you can then prompt the user to restart the application at which point they will be running the latest version.

On a side note I just wanted to mention this is the first document I've written using voice recognition which is built in to windows 7. I've dabble with voice recognition in the past but the latest version in windows 7 seems light years ahead of where we were just a couple of years ago. If you have windows 7 I highly sugest you give it a try.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior) Anytime Fitness
United States United States
No Biography provided

You may also be interested in...


Comments and Discussions

Generaloptimal blogging Pin
Herre Kuijpers23-Sep-09 22:02
memberHerre Kuijpers23-Sep-09 22:02 
GeneralRe: optimal blogging Pin
Paul_Wade2-Oct-09 7:24
memberPaul_Wade2-Oct-09 7:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161021.1 | Last Updated 23 Sep 2009
Article Copyright 2009 by Paul_Wade
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid