Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
To play video in WPF, you use the MediaElement class, just as you did to play sounds. Just as with sounds, you can control the video from the code-behind, using with the class's methods, or you can use EventTriggers to manipulate a Storyboard.
For example, the following markup creates the UI for a simple video viewer that plays a video named Bear.wmv. It can play, stop, and pause the video. There are several important things to notice about the markup: