-
Notifications
You must be signed in to change notification settings - Fork 101
/
AdvancedEntryPage.xaml
108 lines (98 loc) · 5.44 KB
/
AdvancedEntryPage.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:input="clr-namespace:InputKit.Shared.Controls;assembly=InputKit.Maui"
xmlns:vm="clr-namespace:SandboxMAUI.ViewModels"
xmlns:m="clr-namespace:UraniumUI.Icons.MaterialIcons;assembly=UraniumUI.Icons.MaterialIcons"
xmlns:validation="clr-namespace:InputKit.Shared.Validations;assembly=InputKit.Maui"
x:Class="SandboxMAUI.Pages.AdvancedEntryPage"
Title="AdvancedEntryPage">
<ContentPage.BindingContext>
<vm:AdvancedEntryPageViewModel />
</ContentPage.BindingContext>
<ScrollView>
<StackLayout Padding="30" Spacing="10" MaximumWidthRequest="400">
<Label Text="You can see FormView Below:" />
<BoxView HeightRequest="1" Color="LightGray" />
<input:FormView
IsValidated="{Binding IsValidated}"
SubmitCommand="{Binding SubmitCommand}"
Spacing="15">
<input:AdvancedEntry
Title="Place your email below:"
IconImage="{FontImageSource FontFamily=MaterialRegular, Glyph={x:Static m:MaterialRegular.Email}, Color={StaticResource Primary}}"
MaxLength="50"
Placeholder="[email protected]"
PlaceholderColor="LightGray"
Text="{Binding Email}"
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"
ValidationPosition="Before">
<input:AdvancedEntry.Validations>
<validation:RequiredValidation />
</input:AdvancedEntry.Validations>
</input:AdvancedEntry>
<input:AdvancedEntry
Title="Place your name below:"
IconImage="{FontImageSource FontFamily=MaterialRegular, Glyph={x:Static m:MaterialRegular.Person}, Color={StaticResource Primary}}"
MaxLength="30"
PlaceholderColor="LightGray"
Placeholder="John Doe"
Text="{Binding NameSurname}"
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"
ValidationPosition="After">
<input:AdvancedEntry.Validations>
<validation:MinLengthValidation MinLength="3" Message="Your name should contain at least 3 characters." />
<validation:RequiredValidation />
</input:AdvancedEntry.Validations>
</input:AdvancedEntry>
<input:AdvancedEntry
Title="Place your phone number below:"
IconImage="{FontImageSource FontFamily=MaterialRegular, Glyph={x:Static m:MaterialRegular.Phone}, Color={StaticResource Primary}}"
MaxLength="10"
Keyboard="Numeric"
PlaceholderColor="LightGray"
Placeholder="5439998877"
Text="{Binding Phone}"
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}">
<input:AdvancedEntry.Validations>
<validation:DigitsOnlyValidation />
</input:AdvancedEntry.Validations>
</input:AdvancedEntry>
<Label Text="Choose your subscription type:" />
<input:RadioButtonGroupView>
<input:RadioButtonGroupView.Validations>
<validation:RequiredValidation />
</input:RadioButtonGroupView.Validations>
<input:RadioButton Text="Free" />
<input:RadioButton Text="Bronze" />
<input:RadioButton Text="Gold" />
<input:RadioButton Text="Platinium" />
</input:RadioButtonGroupView>
<input:CheckBox
Text="I Accept User Agreement"
Type="Material"
IsChecked="{Binding IsUserAgreementApproved}">
<input:CheckBox.Validations>
<validation:RequiredValidation />
</input:CheckBox.Validations>
</input:CheckBox>
<Grid ColumnDefinitions="*,*">
<Button
Margin="0,20"
input:FormView.IsSubmitButton="True"
BackgroundColor="{StaticResource Primary}"
CornerRadius="20"
Text="Submit"
TextColor="White" />
<Button Grid.Column="1"
Margin="0,20"
input:FormView.IsResetButton="True"
BackgroundColor="White"
CornerRadius="20"
Text="Reset"
TextColor="{StaticResource Primary}" />
</Grid>
</input:FormView>
</StackLayout>
</ScrollView>
</ContentPage>