TimelineMarker class

Applies to Windows and Windows Phone

Represents metadata associated with a specific point in a media file.

Inheritance

Object
  DependencyObject
    TimelineMarker

Syntax


public sealed class TimelineMarker : DependencyObject

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The TimelineMarker class has these types of members:

Constructors

The TimelineMarker class has these constructors.

ConstructorDescription
TimelineMarker Initializes a new instance of the TimelineMarker class.

 

Methods

The TimelineMarker class has these methods. It also inherits methods from the Object class.

MethodDescription
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject)

 

Properties

The TimelineMarker class has these properties.

PropertyAccess typeDescription

Dispatcher

Read-onlyGets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject)

Text

Read/writeGets or sets the text value of a TimelineMarker.

TextProperty

Read-onlyIdentifies the Text dependency property.

Time

Read/writeGets or sets the time at which a TimelineMarker is reached.

TimeProperty

Read-onlyIdentifies the Time dependency property.

Type

Read/writeGets or sets the marker type of a TimelineMarker.

TypeProperty

Read-onlyIdentifies the Type dependency property.

 

Remarks

A timeline marker is metadata associated with a particular point in a media file. These markers are usually created ahead of time and stored in the media file itself. They are typically used to name different scenes in a video or provide scripting cues. By handling the MediaElement object's MarkerReached event or by accessing the MediaElement object's Markers property, you can use timeline markers to trigger actions or enable users to seek to selected positions in the media file.

Examples

The following example creates a MediaElement object and responds to its MarkerReached event. Each time a timeline marker is reached, the example displays the timeline marker's Time, Type, and Text values.


<MediaElement Name="Media" Source="video.mp4" MarkerReached="Media_MarkerReached" />
<TextBlock Name="txOutput" />



private void Media_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
{
    txOutput.Text =
        string.Format("{0},{1},{2}", e.Marker.Time, e.Marker.Text, e.Marker.Type);
}


Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Media
Windows::UI::Xaml::Media [C++]

Metadata

Windows.winmd

See also

DependencyObject

 

 

Show:
© 2014 Microsoft