blob: e854f9fcbbe46c70da7ada1a3cd2a089b0a83157 (
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: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:TouchRadioButton}">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource TangoGrayBrush}"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="MinHeight" Value="40"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TouchRadioButton}">
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
<components:Ripple RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleFactor="20" >
<BulletDecorator Background="Transparent" VerticalAlignment="Center">
<BulletDecorator.Bullet>
<Grid Width="30" Height="30">
<Ellipse x:Name="Ellipse_Border" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1"/>
<Ellipse Margin="8" x:Name="CheckMark" Fill="{TemplateBinding Foreground}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchRadioButton},Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}"/>
</Grid>
</BulletDecorator.Bullet>
<ContentPresenter TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}" Margin="10 0 0 0" VerticalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
</BulletDecorator>
</components:Ripple>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|