Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaPlayer.Clock Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the MediaClock associated with the MediaTimeline to be played.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public MediaClock Clock { get; set; }

Property Value

Type: System.Windows.Media.MediaClock

The clock associated with the MediaTimeline to be played. The default is null.

Setting this property tells the MediaPlayer to be clock driven and will utilize the timing engine, placing the player in Clock mode. Any media that is playing is stopped and the Uri associated with the new clock is opened.

When the player is in clock mode, seeking using Position or calling the Play, Pause, or Stop methods will throw an InvalidOperationException. These operations are only available when the player Clock is null.

.NET Framework
Available since 3.0
Return to top
Show:
© 2018 Microsoft