MediaElement.AreTransportControlsEnabled Property


Gets or sets a value that determines whether the standard transport controls are enabled.

Equivalent WinUI property: Microsoft.UI.Xaml.Controls.MediaElement.AreTransportControlsEnabled.

 property bool AreTransportControlsEnabled { bool get(); void set(bool value); };
bool AreTransportControlsEnabled();

void AreTransportControlsEnabled(bool value);
public bool AreTransportControlsEnabled { get; set; }
var boolean = mediaElement.areTransportControlsEnabled;
mediaElement.areTransportControlsEnabled = boolean;
Public Property AreTransportControlsEnabled As Boolean
<MediaElement AreTransportControlsEnabled="bool" />

Property Value


true if the standard transport controls are enabled; otherwise, false. The default is false.


Here is some code that creates a MediaElement with the built-in transport controls enabled and the AutoPlay property set to false.

<MediaElement x:Name="mediaPlayer" 
              AreTransportControlsEnabled="True" />


The transport controls are exposed as a MediaTransportControls object that you can access through the MediaElement.TransportControls property. See MediaTransportControls for more info.

If AreTransportControlsEnabled is true, the standard transport controls are enabled and displayed on the MediaElement. If AreTransportControlsEnabled is false, the standard transport controls are not enabled and are not displayed.

The transport controls hide themselves after a short period of no user interaction with the MediaElement. They reappear when the user interacts with the MediaElement.

If the Width of MediaElement is not sufficient to display all of the transport controls, a subset of the controls are displayed.

Notes for previous versions

Windows 8.1 You can't access and modify the built-in transport controls. If you create custom transport controls for your app, set this property to false to disable the built-in controls.

Applies to