I am using the default MediaElement with AreTransportControlsEnabled="True" and I am trying to remove the CastButton element when the app is in full screen.
I have already created a copy of MediaTransportControls and commented out the CastButton but this doesn't work when in fullscreen any ideas?
Here is the sample project attached: https://www.dropbox.com/s/83wt4adr8db7xqu/App1.zip?dl=0
My code :
<Style TargetType="MediaTransportControls">
bla bla
<ControlTemplate TargetType="MediaTransportControls">
bla
<!--<AppBarButton x:Name='CastButton'
Style='{StaticResource AppBarButtonStyle}'
Visibility="Collapsed"
MediaTransportControlsHelper.DropoutOrder='7'>
<AppBarButton.Icon>
<FontIcon Glyph=""/>
</AppBarButton>-->
bla bla
My MediaElement:
<MediaElement Source="http://smf.blob.core.windows.net/samples/videos/bigbuck.mp4"
AreTransportControlsEnabled="True"
></MediaElement>
You're almost done correctly. The main reason that your xaml
wasn't merged in global dictionary your application. Just move you xaml
code:
App.xaml
App.xaml
You can see it by code bellow:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Styles/MediaElementStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
I did it through second way. Your project link