Share via

MediaElement.AudioStreamCount Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets the number of audio streams available in the current media file.

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


Public ReadOnly Property AudioStreamCount As Integer
public int AudioStreamCount { get; }

Property Value

Type: System.Int32
The number of audio streams that exist in the source media file. The default value is 0.


Dependency property identifier field: AudioStreamCountProperty

The AudioStreamCount property value is valid only after the MediaOpened event has been raised.

AudioStreamIndex and AudioStreamCount both specifically refer to a collection of only audio streams. This collection is composed locally at run time. If you were to examine the actual media, the audio streams might be interleaved with non-audio stream types, but these other streams will not be part of the collection.

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 This property always returns 1 in Silverlight for Windows Phone.

Version Information


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.