Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
WPF’s video support is built on the same MediaPlayer class described in the previous section, and its companion classes such as MediaElement and MediaTimeline. Therefore, all file formats supported by Windows Media Player can be easily used in WPF applications as well (.wmv, .avi, .mpg, and so on). Also, much of the discussion in this section also applies to playing audio with MediaPlayer and/or MediaElement.
Warning: WPF’s audio and video support requires Windows Media Player 10 or higher!Without at least version 10 installed, the use of MediaPlayer (and related classes) throws an exception. |