blob: eff9fbcf32a0831a00ca55619ef9f7368c818bd5 (
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
39
40
41
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Tango.Touch.Controls"
xmlns:components="clr-namespace:Tango.Touch.Components"
xmlns:local="clr-namespace:Tango.Touch.Styles">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Colors.xaml" />
<ResourceDictionary Source="../Resources/Fonts.xaml" />
<ResourceDictionary>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="TouchRoundCheckBox" TargetType="{x:Type controls:TouchCheckBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:TouchCheckBox}">
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
<components:Ripple RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleFactor="20" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Ellipse x:Name="borderCheckBox" Stroke="{TemplateBinding Property=BorderBrush}" Fill="{TemplateBinding Background}" Width="22" Height="22" StrokeThickness="1"></Ellipse>
<controls:TouchIcon x:Name="checkMark" Padding="2" Width="18" Height="18" Icon="Check" Visibility="{Binding RelativeSource={RelativeSource AncestorType=controls:TouchCheckBox},Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Foreground="White"/>
<ContentPresenter Grid.Column="1" TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}" Margin="10 0 0 0" VerticalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</Grid>
</components:Ripple>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="borderCheckBox" Property="Fill" Value="{StaticResource TangoMidAccentBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|