Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight
Silverlight 3
MediaElement Class
MediaElement Events
 CurrentStateChanged Event
Collapse All/Expand All Collapse All
.NET Framework Class Library for Silverlight
MediaElement..::.CurrentStateChanged Event

Occurs when the value of the CurrentState property changes.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
Visual Basic (Declaration)
Public Event CurrentStateChanged As RoutedEventHandler
Visual Basic (Usage)
Dim instance As MediaElement
Dim handler As RoutedEventHandler

AddHandler instance.CurrentStateChanged, handler
C#
public event RoutedEventHandler CurrentStateChanged
XAML Attribute Usage
<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.

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

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker