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.


One of the great new features of Silverlight 3 is the so called “Out of Browser” support. This means you can run your application without the browser, but still using the browser secure sandbox. The ApplicationIdentity class can be used to provide some extra information about your application when running outside the browser. The ApplicationIdentity class is primarily used in the AppManifest.xaml file in which information about the application is stored, but the identity information can be read from code.

When you look at this file in a new Silverlight 3 project, the ApplicationIdentity part is commented. Uncommenting this section will enable Out of Browser support for your application.


The ApplicationIdentity class provides four read-only static dependency properties.

  • Blurb               Contains a short description of the application
  • ShortName    Contains a short version of the application title
  • Title                 Contains the longer version of the application title
  • Icons               Contains a list of references to images used as Icons in different sizes


The Blurb, ShortName and Title properties are regular strings and can be used like any other strings in xaml.

The Icons property is of type IconCollection, which is a collections of icons.  An Icon has two properties, Source and Size. Source holds the path to a .PNG file of the icon. Size is a string representation of the size, “16x16” for example.


Here’s an example of how the ApplicationIdentity class is used in the AppManifest.xaml file.

<Deployment xmlns="" 
...  >
            ShortName="Out of Browser Silverlight Application" 
            Title="SilverBullet #4 - Test App">
            A demo application explaining Application Identity 
            when running outside of the browser.
            <Icon Size="256x256">Favorites.png</Icon>

You can read the ApplicationIdentity dependency properties from code by using the class directly by getting the values like:

string Blurb = GetValue(ApplicationIdentity.BlurbProperty) as string;
string Title = GetValue(ApplicationIdentity.TitleProperty) as string;
IconCollection icons = GetValue(ApplicationIdentity.IconsProperty) as IconCollection;
aRandomImage.Source = new BitmapImage(new Uri(icons[0].Source));
Shout it
Tags van Technorati:
dotNed blogger
kick it on


Share this post :
Posted on Tuesday, June 23, 2009 12:17 AM Silverlight , SilverBullet | Back to top

Comments on this post: SilverBullet #4 – System.Windows.ApplicationIdentity

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Timmy Kokke | Powered by: