AreTransportControlsEnabled property
TOC
Collapse the table of content
Expand the table of content

MediaElement.AreTransportControlsEnabled property

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

Syntax


public bool AreTransportControlsEnabled { get; set; }


<MediaElement AreTransportControlsEnabled="bool" />

Property value

Type: System.Boolean [.NET] | Platform::Boolean [C++]

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

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.

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" />


Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

MediaElement

 

 

Show:
© 2016 Microsoft