Source Property

MediaElement.Source Property


Gets or sets a media source on the MediaElement.

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

public Uri Source { get; set; }

Property Value

Type: System.Uri

The URI that specifies the source of the element. The default is null.

Exception Condition

The Clock property is not null.

Setting the value of this property causes the media to play.

This property can be set only when the Clock property is null. When the Clock property is non-null, the timing engine controls media playback behavior.

Identifier field


Metadata properties set to true

AffectsMeasure, AffectsRender

.NET Framework
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
© 2015 Microsoft