Source Property

MediaElement.Source Property

 

Gets or sets a media source on the MediaElement.

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

member Source : Uri with get, set

Property Value

Type: System.Uri

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

Exception Condition
InvalidOperationException

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

SourceProperty

Metadata properties set to true

AffectsMeasure, AffectsRender

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