XAML Media

XAML MediaElement is used to play videos in XAML. This article shows how to use XAML MediaElement to display videos.
  • 2818
XAML MediaElement tag allows you to play videos in XAML and WPF. The Source attribute of the tag takes the full path of the video.

The following code shows how to use MediaElement to play a WMV file:

<MediaElement Name="VideoControl" Width="200" Height ="400"

                  Source="C:\Windows\System32\oobe\images\intro.wmv" >    

</MediaElement>

The following code snippet plays a Mpeg video.

<MediaElement Name="VideoControl" Width="200" Height ="400"

                  Source="C:\TestV.MPG" >    

</MediaElement>

 

 

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

 

© 2020 DotNetHeaven. All rights reserved.