Appendix E. MediaElement Control
This appendix summarizes the
MediaElement control's most useful properties, methods, and events.
Note that many of these properties shown in Table E-1 through E-3 are read-only.
Table E.1. Key Properties of Media
Determines the speaker balance.
Returns the percentage of buffering complete.
True if the media can be paused.
Returns the percentage of download complete.
True if the media has audio.
True if the media has video.
True if the control is buffering its media.
True if the audio is muted.
Determines what the control does when it is loaded. This can be
Manual (control "manually" in code),
Play (play when there's valid media),
Close (close and release all memory),
Pause (prepare to play and then pause), or
Stop (prepare to play and then stop).
Returns the media's natural duration. This can be a
TimeSpan (use the
NaturalDuration.HasTimeSpan to see if it has one before using
Returns the video's height.
Returns the video's width.
Determines the playback position.
Determines whether the control updates itself when a seek is performed while the control is paused.
The media's source
Determines the speed ratio. Use a value less than 1 for slow motion or a value greater than 1 for fast ...
Get WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4 now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.