blob: 13aed5ad7670aa80708840bf4abd284f6e2c4a6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:components="clr-namespace:Tango.Touch.Components"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:fa="http://schemas.fontawesome.io/icons/"
xmlns:local="clr-namespace:Tango.Touch.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Colors.xaml" />
<ResourceDictionary>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type local:TouchCheckBox}">
<Setter Property="Background" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
<Setter Property="Height" Value="24"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TouchCheckBox}">
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
<components:Ripple RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleFactor="20">
<DockPanel>
<Border Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" DockPanel.Dock="Left" Padding="5" CornerRadius="3" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<fa:ImageAwesome Icon="Check" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchCheckBox},Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Foreground="{StaticResource TangoLightForegroundBrush}"/>
</Border>
<ContentPresenter Margin="10 0 0 0" VerticalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</DockPanel>
</components:Ripple>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|