-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Other4Switch.xaml
70 lines (69 loc) · 3.16 KB
/
Other4Switch.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
<?xml version="1.0" encoding="UTF-8" ?>
<switch:CustomSwitch x:Class="Sample.Examples.Other4Switch"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:icon="clr-namespace:Sample.Resources;assembly=Sample"
xmlns:switch="clr-namespace:Switch;assembly=Switch"
BackgroundColor="#f3f3f2"
CornerRadius="25"
HeightRequest="50"
KnobColor="White"
KnobCornerRadius="30"
KnobHeight="60"
KnobLimit="Boundary"
KnobWidth="60"
VibrateDuration="20"
WidthRequest="120">
<switch:CustomSwitch.BackgroundContent>
<FlexLayout JustifyContent="SpaceEvenly">
<Label FontAttributes="Bold"
FontFamily="FontAwesome"
FontSize="Large"
HorizontalOptions="FillAndExpand"
HorizontalTextAlignment="Center"
Text="{x:Static icon:IconFont.Times}"
TextColor="DarkGray"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
WidthRequest="60" />
<Label FontAttributes="Bold"
FontFamily="FontAwesome"
FontSize="Large"
HorizontalOptions="FillAndExpand"
HorizontalTextAlignment="Center"
Text="{x:Static icon:IconFont.Check}"
TextColor="DarkGray"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
WidthRequest="60" />
</FlexLayout>
</switch:CustomSwitch.BackgroundContent>
<switch:CustomSwitch.KnobContent>
<StackLayout Orientation="Horizontal">
<FlexLayout x:Name="Flex"
JustifyContent="SpaceEvenly"
WidthRequest="120">
<Label FontAttributes="Bold"
FontFamily="FontAwesome"
FontSize="Large"
HorizontalOptions="FillAndExpand"
HorizontalTextAlignment="Center"
Text="{x:Static icon:IconFont.Times}"
TextColor="#dd2424"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
WidthRequest="60" />
<Label FontAttributes="Bold"
FontFamily="FontAwesome"
FontSize="Large"
HorizontalOptions="FillAndExpand"
HorizontalTextAlignment="Center"
Text="{x:Static icon:IconFont.Check}"
TextColor="#46d744"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
WidthRequest="60" />
</FlexLayout>
</StackLayout>
</switch:CustomSwitch.KnobContent>
</switch:CustomSwitch>