AutoPlay Property

Gets or sets a value that indicates whether media will begin playback automatically when the Source property is set.

XAML
<object AutoPlay="Boolean" .../>
Scripting
value = object.AutoPlay
object.AutoPlay = value

Property Value

Boolean

true if playback is automatic; otherwise, false.

This property is read/write. The default value is true.

Remarks

In script, set this property to false before setting the Source property to pause the media at load time. Call the Play method to start media playback. When opened, the media will be in Stopped state.

Applies To

MediaElement

See Also

MediaOpened, Source (MediaElement), Media Overview, Supported Media Formats and Protocols