user1120193
user1120193

Reputation: 250

How do I get the current position of a video which is being played? C#,WPF,MediaPlayer Class

I am developing a C#,WPF app which plays media contents I need to track down the current position of the video which is being played but there isn't a proper event to get it in real time. I use the MediaPlayer class and I need to get the time from Position property in real time so how do I do that? cause it trigs down events when the media is opened closed, and there are some events but not sure how they are useful to this anyway it does not trig any event when a video is being played.

Upvotes: 1

Views: 2251

Answers (1)

Odys
Odys

Reputation: 9080

use MediaElement.Position Property

more here:

Upvotes: 1

Related Questions