MediaElement.AreTransportControlsEnabled Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that determines whether the standard transport controls are enabled.
public:
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
bool
true if the standard transport controls are enabled; otherwise, false. The default is false.
Examples
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"
Source="Videos/video1.mp4"
Width="400"
AutoPlay="False"
AreTransportControlsEnabled="True" />
Remarks
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.