In this article I am explaining how to use the MediaPlayer class in a WPF application. This is a relatively short article because I am describing only how to draw a MediaPlayer on a visual surface. To demonstrate this, I have created a demo application using Visual C# 2010 Express Edition.
There are two commonly used approaches to play media in a WPF application. One is using the MediaElementcontrol and the other is using the MediaPlayer class.
Using the MediaElement is a simple and straightforward approach. The MediaElement control has a Graphical User Interface and can be added using either XAML code or code-behind code. It provides playback and control capabilities using Play, Pause and Stop methods. The media file to be played is specified using the Source property of theMediaElement control.
There are two commonly used approaches to play media in a WPF application. One is using the MediaElementcontrol and the other is using the MediaPlayer class.
Using the MediaElement is a simple and straightforward approach. The MediaElement control has a Graphical User Interface and can be added using either XAML code or code-behind code. It provides playback and control capabilities using Play, Pause and Stop methods. The media file to be played is specified using the Source property of theMediaElement control.
Read More...
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.
Stay tuned to my blog, twitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
C#,Dev,WPF,Intermediate
Stay tuned to my blog, twitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
This article is related to
C#,Dev,WPF,Intermediate
0 Comments