Duration Property
Collapse the table of content
Expand the table of content

AudioTrack.Duration Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

The length of the track.

Namespace:  Microsoft.Phone.BackgroundAudio
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

public TimeSpan Duration { get; }

Property Value

Type: System.TimeSpan
Returns TimeSpan.

This value is calculated by the system.

This property is zero if the track is not ready, or is in the process of preparing for playback. This can occur immediately after switching tracks, even after the foreground application has received the PlayStateChanged event.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

© 2017 Microsoft