Closed panzur closed 7 years ago
Copy the vlc:MediaTransportControls default style into a ResourceDictionary in your project, and edit it like you want. Give the Style an x:Key value to identify it, like this :
<Style TargetType="vlc:MediaTransportControls" x:Key="myTransportControlsStyle">
<!-- Style content ... -->
</Style>
Add your ResourceDictionary file in App.xaml :
<Application x:Class="MyApp.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes\MediaTransportControls.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Add a vlc:MediaElement with vlc:MediaTransportControls to your UI. Set the Style property of the MediaTransportControls element to your custom Style resource, as shown here :
<vlc:MediaElement AreTransportControlsEnabled="True">
<vlc:MediaElement.TransportControls>
<vlc:MediaTransportControls Style="{StaticResource myTransportControlsStyle}" />
</vlc:MediaElement.TransportControls>
</vlc:MediaElement>
Is there way to change the template? Can you provide an example?