Export (0) Print
Expand All

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 Uri Source { get; set; }
<object Source="Uri" .../>

Property Value

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

Identifier field

SourceProperty

Metadata properties set to true

AffectsMeasure, AffectsRender

ExceptionCondition
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.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft