Files
QuickLook/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/Styles.xaml
2017-07-29 00:19:50 +03:00

228 lines
12 KiB
XML

<!--
This file is a part of unosquare/ffmediaelement project: <https://github.com/unosquare/ffmediaelement>
-->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="ControlButtonStyle" TargetType="Grid">
<Setter Property="Height" Value="50" />
<Setter Property="Width" Value="50" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#22FFFFFF" />
</Trigger>
</Style.Triggers>
</Style>
<SolidColorBrush x:Key="CustomSliderForegroundBrush" Color="#FFEFEFEF" />
<SolidColorBrush x:Key="CustomSliderBackgroundBrush" Color="#55ffffff" />
<SolidColorBrush x:Key="CustomSliderHighlightBrush" Color="#FFEFEFEF" />
<!-- Postion Slider Control -->
<ControlTemplate x:Key="PositionSliderThumbTemplate" TargetType="{x:Type Thumb}">
<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
<Path x:Name="grip" Data="M 0,0 A 180,180 180 1 1 1,1 Z" Fill="Transparent" Stretch="Fill"
Stroke="{StaticResource CustomSliderForegroundBrush}" StrokeThickness="2.5" UseLayoutRounding="True"
VerticalAlignment="Center"
Margin="-1,-1" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsDragging" Value="true">
<Setter Property="Fill" TargetName="grip" Value="{StaticResource CustomSliderForegroundBrush}" />
<Setter Property="Stroke" TargetName="grip" Value="{StaticResource CustomSliderForegroundBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Visibility" TargetName="grip" Value="Hidden" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="Fill" TargetName="grip" Value="{StaticResource CustomSliderForegroundBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="PositionSliderTemplate" TargetType="{x:Type Slider}">
<Border x:Name="border" Background="Transparent" SnapsToDevicePixels="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="{TemplateBinding MinHeight}" />
</Grid.RowDefinitions>
<DockPanel LastChildFill="True">
<Border ClipToBounds="True" x:Name="PART_SelectionRange" Height="3" Visibility="Visible">
<Rectangle RadiusX="1" RadiusY="1" Margin="10,0,-10,0"
Fill="{StaticResource CustomSliderForegroundBrush}" />
</Border>
<Border ClipToBounds="True" Height="3" Visibility="Visible">
<Rectangle RadiusX="1" RadiusY="1" Margin="20,0,10,0"
Fill="{StaticResource CustomSliderBackgroundBrush}" />
</Border>
</DockPanel>
<Track x:Name="PART_Track">
<Track.Thumb>
<Thumb x:Name="Thumb" Focusable="False" Width="{TemplateBinding MinHeight}"
Height="{TemplateBinding MinHeight}"
OverridesDefaultStyle="True" Template="{StaticResource PositionSliderThumbTemplate}"
VerticalAlignment="Center" />
</Track.Thumb>
</Track>
</Grid>
</Border>
</ControlTemplate>
<Style x:Key="PositionSliderStyle" TargetType="{x:Type Slider}">
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="MinHeight" Value="20" />
<Setter Property="MaxHeight" Value="20" />
<Setter Property="Height" Value="20" />
<Setter Property="Minimum" Value="0" />
<Setter Property="AutoToolTipPlacement" Value="None" />
<Setter Property="IsMoveToPointEnabled" Value="True" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="SelectionStart" Value="0" />
<Setter Property="SelectionEnd" Value="{Binding Path=Value, RelativeSource={RelativeSource Self}}" />
<Setter Property="Template" Value="{StaticResource PositionSliderTemplate}" />
</Style>
<!-- Custom Slider Control -->
<ControlTemplate x:Key="CustomSliderThumbTemplate" TargetType="{x:Type Thumb}">
<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
<Rectangle x:Name="grip" Fill="{StaticResource CustomSliderForegroundBrush}" Width="8"
Height="{Binding Path=Height, RelativeSource={RelativeSource TemplatedParent}}"
StrokeThickness="0"
UseLayoutRounding="True" Stretch="Fill" RadiusX="3" RadiusY="3" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsDragging" Value="true">
<Setter Property="Fill" TargetName="grip" Value="{StaticResource CustomSliderHighlightBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Fill" TargetName="grip" Value="{StaticResource CustomSliderBackgroundBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="Fill" TargetName="grip" Value="{StaticResource CustomSliderForegroundBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="CustomSliderTemplate" TargetType="{x:Type Slider}">
<Border x:Name="border" Background="Transparent" SnapsToDevicePixels="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="{TemplateBinding MinHeight}" />
</Grid.RowDefinitions>
<DockPanel LastChildFill="True">
<Border ClipToBounds="True" x:Name="PART_SelectionRange" Height="3" Visibility="Visible">
<Rectangle RadiusX="1" RadiusY="1" Margin="4,0,-4,0"
Fill="{StaticResource CustomSliderForegroundBrush}" />
</Border>
<Border ClipToBounds="True" Height="3" Visibility="Visible">
<Rectangle x:Name="PART_NegativeSelection" RadiusX="1" RadiusY="1" Margin="8,0,4,0"
Fill="{StaticResource CustomSliderBackgroundBrush}" />
</Border>
</DockPanel>
<Track x:Name="PART_Track">
<Track.Thumb>
<Thumb x:Name="Thumb" Focusable="False" Width="8" Height="{TemplateBinding MinHeight}"
OverridesDefaultStyle="True" Template="{StaticResource CustomSliderThumbTemplate}"
VerticalAlignment="Center" />
</Track.Thumb>
</Track>
</Grid>
</Border>
</ControlTemplate>
<Style x:Key="CustomSliderStyle" TargetType="{x:Type Slider}">
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="MinHeight" Value="26" />
<Setter Property="MaxHeight" Value="26" />
<Setter Property="Height" Value="26" />
<Setter Property="Minimum" Value="0" />
<Setter Property="IsSnapToTickEnabled" Value="True" />
<Setter Property="SmallChange" Value="0.01" />
<Setter Property="LargeChange" Value="0.01" />
<Setter Property="TickFrequency" Value="0.01" />
<Setter Property="AutoToolTipPlacement" Value="None" />
<Setter Property="IsMoveToPointEnabled" Value="True" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="SelectionStart" Value="{Binding Path=Minimum, RelativeSource={RelativeSource Self}}" />
<Setter Property="SelectionEnd" Value="{Binding Path=Value, RelativeSource={RelativeSource Self}}" />
<Setter Property="Template" Value="{StaticResource CustomSliderTemplate}" />
</Style>
<Style x:Key="NetworkProgressBarStyle" TargetType="{x:Type ProgressBar}">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Height" Value="3" />
<Setter Property="Margin" Value="10,0" />
<Setter Property="Minimum" Value="0" />
<Setter Property="Maximum" Value="1" />
<Setter Property="Background" Value="{StaticResource CustomSliderBackgroundBrush}" />
</Style>
<Style x:Key="ModernToggleButtonStyle" TargetType="ToggleButton">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#22FFFFFF" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#44FFFFFF" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="#44FFFFFF" />
</Trigger>
</Style.Triggers>
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Width" Value="45" />
<Setter Property="Height" Value="45" />
<Setter Property="Padding" Value="12" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{StaticResource CustomSliderHighlightBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Background="{TemplateBinding Background}" BorderThickness="0"
Padding="{TemplateBinding Padding}">
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ModernButtonStyle" TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#22FFFFFF" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#44FFFFFF" />
</Trigger>
</Style.Triggers>
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Width" Value="45" />
<Setter Property="Height" Value="45" />
<Setter Property="Padding" Value="12" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{StaticResource CustomSliderHighlightBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}" BorderThickness="0"
Padding="{TemplateBinding Padding}">
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ControlsGridStyle" TargetType="{x:Type Grid}">
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Height" Value="250" />
<Setter Property="Background" Value="{DynamicResource ShadedBackgroundBrush}" />
</Style>
</ResourceDictionary>