Export (0) Print
Expand All

MediaElement.Position Property

Gets or sets the current position of progress through the media's playback time.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public TimeSpan Position { get; set; }

Property Value

Type: System.TimeSpan
The amount of time since the beginning of the media. The default is 00:00:00.

ExceptionCondition
InvalidOperationException

The Clock property is not null.

Setting this property can enable you to jump to different points in playback (also known as seeking). Not all media types allow seek operations. The MediaFailed event will fire if the media source does not allow seeking.

This property has no effect until after the MediaOpened event has occurred.

This property can be set only when the Clock property is null. When the Clock property is non-null, the timing engine controls media playback behavior.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft