Geeks With Blogs


Timmy Kokke's Blog

↑ Grab this Headline Animator

Timmy Kokke at Blogged
Timmy Kokke …just sorting my bubbles…

silverbullet I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe.


When running Silverlight outside the browser, there’s the possibility that the computer that is running the applications is disconnected. This is where the System.Windows.ApplicationServiceContext class comes in. This class represents the initial state when the application is started. It has no methods of any significance, only two read only properties.


    • ApplicationInitParams : Gets the parameters specified by the page where the silverlight plug-in is embedded in.
    • RunningOffline: Indicated if the application is running in offline mode


The ApplicationInitParams property is a Dictionary of a string/string key/value pair and contains parameters with their values. On MSDN is a detailed article about how to define the HTML for using init parameters and query parameters and how to read them in Silverlight.

The RunningOffline property is a bool. It is True if the application is running offline and False when the application is running online. If you have enabled you application to run out of the browser, you can check this property to see if you can access any online services which may not be available when running offline.

Shout it
Tags van Technorati:
dotNed blogger
kick it on
Posted on Tuesday, June 30, 2009 6:10 AM Silverlight , SilverBullet | Back to top

Comments on this post: SilverBullet #5 – System.Windows.ApplicationServiceContext

# re: SilverBullet #5 – System.Windows.ApplicationServiceContext
Requesting Gravatar...
Nice post! It was such a messy code to keep InitParams for my application.
Left by Gongdo on Jul 03, 2009 4:14 PM

Your comment:
 (will show your gravatar)

Copyright © Timmy Kokke | Powered by: