TimelineMarker TimelineMarker TimelineMarker Class

Definition

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

public : sealed class TimelineMarker : DependencyObject, ITimelineMarker
public sealed class TimelineMarker : DependencyObject, ITimelineMarker
Public NotInheritable Class TimelineMarker Inherits DependencyObject Implements ITimelineMarker
Inheritance
TimelineMarkerTimelineMarkerTimelineMarker
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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);
}

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.

Constructors

TimelineMarker() TimelineMarker() TimelineMarker()

Initializes a new instance of the TimelineMarker class.

public : TimelineMarker()
public TimelineMarker()
Public Sub New()

Properties

Dispatcher Dispatcher Dispatcher

Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)

Text Text Text

Gets or sets the text value of a TimelineMarker.

public : Platform::String Text { get; set; }
public string Text { get; set; }
Public ReadWrite Property Text As string
Value
Platform::String string string

The text value of the TimelineMarker. The default value is an empty string.

TextProperty TextProperty TextProperty

Identifies the Text dependency property.

public : static DependencyProperty TextProperty { get; }
public static DependencyProperty TextProperty { get; }
Public Static ReadOnly Property TextProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Text dependency property.

Time Time Time

Gets or sets the time at which a TimelineMarker is reached.

public : TimeSpan Time { get; set; }
public TimeSpan Time { get; set; }
Public ReadWrite Property Time As TimeSpan
Value
TimeSpan TimeSpan TimeSpan

The time at which the TimelineMarker is reached. The default value is null.

TimeProperty TimeProperty TimeProperty

Identifies the Time dependency property.

public : static DependencyProperty TimeProperty { get; }
public static DependencyProperty TimeProperty { get; }
Public Static ReadOnly Property TimeProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Time dependency property.

Type Type Type

Gets or sets the marker type of a TimelineMarker.

public : Platform::String Type { get; set; }
public string Type { get; set; }
Public ReadWrite Property Type As string
Value
Platform::String string string

A string that describes the type of this TimelineMarker. The default value is an empty string.

TypeProperty TypeProperty TypeProperty

Identifies the Type dependency property.

public : static DependencyProperty TypeProperty { get; }
public static DependencyProperty TypeProperty { get; }
Public Static ReadOnly Property TypeProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Type dependency property.

Methods

ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)

GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)

GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)

ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)

RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)

SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)

UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)

See Also