The MediaElement


What this chapter covers:
  • What is the MediaElement

  • Playback modes

WPF/Silverlight were created to develop Rich Media Applications for both online and offline use. Audio and video are a large part of any Rich Media Application, and Microsoft did not forget this when it engineered WPF/Silverlight, because Microsoft added a very powerful control called the MediaElement that can play audio as well as video. Further, Microsoft made this UserControl 100% controllable by giving the developer the ability to, among other things, play, pause, and stop the media. The MediaElement even broadcasts events when it is started, stopped, or paused, allowing the developer to hook into those events and respond to them. A good example might be the MediaElement in an application could disappear when the user stops the video. In this chapter, I will discuss the MediaElement in detail and provide examples of how to implement one in both XAML and C#. So, let’s get started.


Video File Independent Mode Visual Studio Source Video Runtime Error 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Victor Gaudioso 2008

Personalised recommendations