-
Notifications
You must be signed in to change notification settings - Fork 3
/
CheckStyles.xaml
94 lines (91 loc) · 5.37 KB
/
CheckStyles.xaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="UTF-8"?>
<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:global="clr-namespace:Global.InputForms;assembly=Global.InputForms"
x:Class="SampleApp.Styles.CheckStyles">
<ControlTemplate x:Key="IconCheck">
<global:CheckLabel CheckType="Check"
BackgroundColor="Transparent"
BorderColor="Gray"
CheckedBackgroundColor="Transparent"
CheckedBorderColor="Blue"
CheckedColor="Blue" />
</ControlTemplate>
<ControlTemplate x:Key="RightIconCheck">
<global:CheckLabel CheckType="Check"
HorizontalOptions="End"
IconPosition="End"
BackgroundColor="Transparent"
BorderColor="Gray"
CheckedBackgroundColor="Transparent"
CheckedBorderColor="Blue"
CheckedColor="Blue" />
</ControlTemplate>
<ControlTemplate x:Key="IconRadio">
<global:CheckLabel CheckType="Fill" IconSize="20" CornerRadius="10"
BackgroundColor="Transparent"
BorderColor="Gray"
CheckedBackgroundColor="Transparent"
CheckedBorderColor="Blue"
CheckedColor="Blue" />
</ControlTemplate>
<ControlTemplate x:Key="ButtonRadio">
<global:CheckButton Text="Hop!"
WidthRequest="70" HeightRequest="30" CornerRadius="15" FontSize="12"
BackgroundColor="LightGray"
BorderColor="LightGray"
TextColor="Navy"
CheckedBackgroundColor="Navy"
CheckedBorderColor="White"
CheckedTextColor="White" />
</ControlTemplate>
<ControlTemplate x:Key="IconRateImage">
<global:CheckContent CheckType="Image" ImageChecked="StarChecked" ImageUnchecked="StarUnchecked"
IconSize="20" Padding="5,0,5,0" />
</ControlTemplate>
<ControlTemplate x:Key="IconRadioImage">
<global:CheckLabel CheckType="Image" ImageChecked="RadioButtonChecked"
ImageUnchecked="RadioButtonUnchecked" />
</ControlTemplate>
<ControlTemplate x:Key="IconCheckImage">
<global:CheckLabel CheckType="Image" ImageChecked="BoxChecked" ImageUnchecked="BoxUnchecked" />
</ControlTemplate>
<ControlTemplate x:Key="IconCustomRateRed">
<global:CheckContent CheckType="Custom" CheckedLabel="★" UncheckedLabel="☆"
CheckLabelFontSize="30"
CheckLabelFontAttributes="Bold"
IconSize="30"
Color="{StaticResource Primary}"
BorderColor="Transparent"
BackgroundColor="Transparent"
CheckedColor="{StaticResource Primary}"
CheckedBorderColor="Transparent"
CheckedBackgroundColor="Transparent">
<global:CheckLabel.CheckLabelMargin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="iOS" Value="0" />
<On Platform="Android, WinPhone, Windows" Value="0,-10,0,0" />
</OnPlatform>
</global:CheckLabel.CheckLabelMargin>
</global:CheckContent>
</ControlTemplate>
<ControlTemplate x:Key="IconCustomRate">
<global:CheckContent CheckType="Custom" CheckedLabel="★" UncheckedLabel="☆"
CheckLabelFontSize="30"
CheckLabelFontAttributes="Bold"
IconSize="30"
Color="#DAA520"
BorderColor="Transparent"
BackgroundColor="Transparent"
CheckedColor="#DAA520"
CheckedBorderColor="Transparent"
CheckedBackgroundColor="Transparent">
<global:CheckLabel.CheckLabelMargin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="iOS" Value="0" />
<On Platform="Android, WinPhone, Windows" Value="0,-10,0,0" />
</OnPlatform>
</global:CheckLabel.CheckLabelMargin>
</global:CheckContent>
</ControlTemplate>
</ResourceDictionary>