MediaElement::Source Property

Gets or sets a media source on the MediaElement.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public:
property Uri^ Source {
	Uri^ get ();
	void set (Uri^ value);
}
<object Source="Uri" .../>

Property Value

Type: System::Uri
The URI that specifies the source of the element. The default is nullptr.

Identifier field

SourceProperty

Metadata properties set to true

AffectsMeasure, AffectsRender

ExceptionCondition
InvalidOperationException

The Clock property is not nullptr.

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

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft