blob: cab8eea01953d20914babf922de7d1701b593dd0 (
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
38
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fa="http://schemas.fontawesome.io/icons/"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:components="clr-namespace:Tango.Touch.Components"
xmlns:local="clr-namespace:Tango.Touch.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
<Style TargetType="{x:Type local:TouchToggleIconButton}">
<Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
<Setter Property="CheckedForeground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TouchToggleIconButton}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}">
<components:Ripple CornerRadius="{TemplateBinding CornerRadius}" RippleBrush="{StaticResource TangoRippleDarkBrush}">
<Grid Margin="{TemplateBinding Padding}">
<local:TouchIcon Icon="{TemplateBinding Icon}" Foreground="{TemplateBinding Foreground}" Visibility="{TemplateBinding IsChecked,Converter={StaticResource BooleanToVisibilityInverseConverter}}" />
<local:TouchIcon Icon="{TemplateBinding CheckedIcon}" Foreground="{TemplateBinding CheckedForeground}" Visibility="{TemplateBinding IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" />
</Grid>
</components:Ripple>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|