Run video in wpf

try using MediaElement

<MediaElement Name="VideoControl" 
              Source="C:\my.wmv" >    
</MediaElement>

Its pretty simple just use the MediaElement control in wpf to display your video on your form

Simple WPF Media Player


Using MediaElement control you will can play a video in WFP. XAML code:

<MediaElement Name="VideoControl" Width="200" Height ="400"
                  Source="your_path_to_video_file.wmv" >    
</MediaElement>

It plays MPG files, too: Source="C:\TestV.MPG"

To know how to control it using Play, Stop, Pause buttons click here. It's a good article about this with many examples.

Tags:

C#

Wpf

Video