I have a video player in my UWP app, and I want to get rid of some buttons on the seek bar bar. This is the layout:
<MediaPlayerElement x:Name="VideoElement"
AreTransportControlsEnabled="True"
AutoPlay="True">
<MediaPlayerElement.TransportControls>
<MediaTransportControls IsZoomButtonVisible="False" IsFullWindowButtonVisible="False" />
</MediaPlayerElement.TransportControls>
</MediaPlayerElement>
I successfully removed "fullscreen" and "zoom" buttons, but I do not know how to remove this "playback on device" button. Does anyone know what field in MediaTransportControls
controls it?
How to remove the rightmost button from MediaPlayer bar
The rightmost button is CastButton
you could find it in MediaTransportControls
style. You could set the property Opacity="0" IsEnabled="False"
to hide it.
<AppBarButton x:Name='CastButton' Opacity="0" IsEnabled="False"
Style='{StaticResource AppBarButtonStyle}'
MediaTransportControlsHelper.DropoutOrder='11'>
<AppBarButton.Icon>
<FontIcon Glyph="" />
</AppBarButton.Icon>
</AppBarButton>