Thursday, November 19, 2009

How to check if Silverlight Running out of browser or in the browser ?

As Silverlight increases its Out of Browser features it will become more important to detect if the application is running in or out of the browser.  This is the check:

if (Application.Current.IsRunningOutOfBrowser)
{
// Out of Browser

}
else

{
// in the browser

}