O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

States and Events

At any time, MediaElement can be in one of the following states, revealed by its read-only CurrentState property: Closed, Opening, Buffering, Playing, Paused, or Stopped. Closed is the initial state. It transitions to Opening after the source is set, but before MediaOpened or MediaFailed is raised. During this state, any calls to Play, Pause, or Stop are queued until the media is opened. A CurrentStateChanged event is raised for every state transition. A MediaEnded event is raised once the content reaches the end and stops playback. This doesn’t get raised due to programmatic Stop calls, and it never gets raised if the content is looping.

Whenever content is buffering or downloading (in the case of content from a remote server), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required