Thursday, May 21, 2009

Whether Silverlight 3 application is running online or not

Just check the below mentioned property to know the network status of Silverlight application.We can do operations according to that.
Application.Current.ExecutionState

There are 5 possible states which are defined in System.Windows.ExecutionStates

// Summary:
// Defines constants that indicate the state of an application that can run
// offline.
public enum ExecutionStates
{
// Summary:
// The application is running within its host Web page.
RunningOnline = 0,
//
// Summary:
// The application is in the process of detaching from its host Web page.
Detaching = 1,
//
// Summary:
// The application is running in offline mode, detached from its host Web page.
Detached = 2,
//
// Summary:
// The application is running in offline mode, but a newer version of the application
// has been downloaded and will be used the next time the application is launched.
DetachedUpdatesAvailable = 3,
//
// Summary:
// The application could not be detached from its host Web page.
DetachFailed = 4,
}

Tuesday, May 19, 2009

RoutedEvents for Silverlight 3

It is my pleasure to inform you that my colleague Andrew Whiddett at Identitymine has developed and released code for implementing Routed events in Silverlight 3.The code is available in Codeplex.See the below link.

http://sl3routedevents.codeplex.com/

Enjoy…