Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaElement.CurrentStateChanged Event

Silverlight

Occurs when the value of the CurrentState property changes.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

public event RoutedEventHandler CurrentStateChanged
<MediaElement CurrentStateChanged="eventhandler"/>

It is possible for the CurrentStateChanged event to be raised multiple times before its event handlers are executed.

Although this event occurs when the CurrentState becomes invalid, that does not necessarily mean that the CurrentState property has a new value. For example, the CurrentState property might have switched from Playing to Buffering and back to Playing so rapidly that only a single CurrentStateChanged event was raised, in which case the property will not appear to have changed values. Also, your application should not assume an order in which the events occur, particularly for the transient states such as "Buffering". One of the transient states may have been skipped over in event reporting because it happened so rapidly.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2014 Microsoft