Expand Minimize

MediaElement.AreTransportControlsEnabled property

Applies to Windows and Windows Phone

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

Syntax


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


<MediaElement AreTransportControlsEnabled="bool" />

Property value

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

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

Remarks

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

If AreTransportControlsEnabled is false, the standard transport controls are not enabled and will not be displayed. If you create custom transport controls for your app, you probably want to set this to false.

The transport controls will hide themselves after a short period of no user interaction with the MediaElement. They will 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.

The standard transport controls provides the following UI, depending on the type of media.

UI ControlModesAudioVideoNotes
Play buttonPlay, PauseYes YesButton icon changes to denote current state.
Mute buttonMuted, Not MutedYesYesButton icon changes to denote current state.
Seek sliderYesYes
Remaining timeYesYesDisplays time in 1 second increments.
Volume sliderYesYesThe volume slider is shown after the volume or mute buttons have been pressed. It is automatically dismissed in 3 seconds unless it is being activity manipulated by the user or the pointer is over it.
Full window ButtonNormal, full windowNoYesIf you implement your own full window control, use the IsFullWindow property to enable and disable full window rendering. This insures system level optimizations are used during media playback.
Audio Language ButtonDisplays multiple audio tracks.YesYesThe control is only visible when the media has multiple audio tracks.
Elapsed Time YesYesThe remaining time is shown to the left of the position slider.
Zoom ButtonNon-Zoom, ZoomNoYesToggles the MediaElement.Stretch between Uniform, which is the default, and UniformToFill.

 

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

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:
© 2014 Microsoft