Aiono
Aiono

Reputation: 393

UWP how to use MediaPlayer events in MediaPlayerElement in XAML?

I have read this documentation about MediaPlayerElement and it says MediaPlayerElement contains properties of MediaPlayer class. But I couldn't figure out how can I use MediaPlayer's events on MediaPlayerElement.

Upvotes: 1

Views: 265

Answers (1)

Martin Zikmund
Martin Zikmund

Reputation: 39102

As the documentation states:

The majority of the media functionality is located on the underlying MediaPlayer class, which you can access through the MediaPlayerElement.MediaPlayer property

So to use and set any events of MediaPlayer, you just use the MediaPlayer property of the MediaPlayerElement.

Upvotes: 1

Related Questions