You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
9.5 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. x:Class="GMCabsDriverAssistantSolution.Views.UserSignUpPage"
  5. xmlns:vm="clr-namespace:GMCabsDriverAssistantSolution.ViewModels"
  6. xmlns:custom="clr-namespace:GMCabsDriverAssistantSolution.CustomControls"
  7. Shell.FlyoutBehavior="Disabled"
  8. Title="User Signup">
  9. <ContentPage.BindingContext>
  10. <vm:UserSignUpViewModel />
  11. </ContentPage.BindingContext>
  12. <ContentPage.Resources>
  13. <ResourceDictionary>
  14. <Style x:Key="EntryStyle" TargetType="Entry">
  15. <Setter Property="TextColor" Value="#000"></Setter>
  16. <Setter Property="PlaceholderColor" Value="#9999"></Setter>
  17. <Setter Property="TranslationY" Value="1" />
  18. <Setter Property="MinimumHeightRequest" Value="36" />
  19. <Setter Property="Margin" Value="0,10,0,-8"/>
  20. </Style>
  21. <Style x:Key="NoUnderlineEntryFrameStyle" TargetType="Frame">
  22. <Setter Property="Padding">
  23. <OnPlatform x:TypeArguments="Thickness">
  24. <On Platform="Android">16,4</On>
  25. <On Platform="iOS">16</On>
  26. </OnPlatform>
  27. </Setter>
  28. <Setter Property="CornerRadius" Value="12"></Setter>
  29. <Setter Property="Margin" Value="4,8,4,4"></Setter>
  30. <Setter Property="HasShadow" Value="True"></Setter>
  31. <Setter Property="MinimumHeightRequest" Value="50" />
  32. <Setter Property="BackgroundColor" Value="White" />
  33. </Style>
  34. </ResourceDictionary>
  35. </ContentPage.Resources>
  36. <ContentPage.Content>
  37. <StackLayout Orientation="Vertical"
  38. BackgroundColor="#DCDCDC">
  39. <StackLayout.Padding>
  40. <OnPlatform x:TypeArguments="Thickness">
  41. <On Platform="Android">20</On>
  42. <On Platform="iOS">20,60</On>
  43. </OnPlatform>
  44. </StackLayout.Padding>
  45. <ScrollView>
  46. <StackLayout Orientation="Vertical">
  47. <Label Text="Enter your details to complete your registration"
  48. FontSize="Title"
  49. HorizontalOptions="CenterAndExpand"
  50. TextColor="Black"
  51. Margin="15,15,15,5"/>
  52. <Frame Style="{StaticResource NoUnderlineEntryFrameStyle}" Margin="15,15,15,5">
  53. <Grid MinimumHeightRequest="50" >
  54. <Grid.ColumnDefinitions>
  55. <ColumnDefinition Width="1"/>
  56. <ColumnDefinition Width="*"/>
  57. </Grid.ColumnDefinitions>
  58. <custom:NoUnderlineEntry Grid.Column="1"
  59. x:Name="DriverLicence"
  60. FontSize="20"
  61. Keyboard="Text"
  62. Text="{Binding DriverLicence}"
  63. Placeholder="Driver Licence"
  64. Style="{StaticResource EntryStyle}"/>
  65. </Grid>
  66. </Frame>
  67. <StackLayout Orientation="Horizontal" Margin="15,5,15,5">
  68. <Frame Style="{StaticResource NoUnderlineEntryFrameStyle}" WidthRequest="178" Margin="0,0,3,0">
  69. <Grid MinimumHeightRequest="50" >
  70. <Grid.ColumnDefinitions>
  71. <ColumnDefinition Width="1"/>
  72. <ColumnDefinition Width="*"/>
  73. </Grid.ColumnDefinitions>
  74. <custom:NoUnderlineEntry Grid.Column="1"
  75. x:Name="FirstName"
  76. FontSize="20"
  77. Keyboard="Text"
  78. Text="{Binding FirstName}"
  79. Placeholder="First Name"
  80. Style="{StaticResource EntryStyle}"/>
  81. </Grid>
  82. </Frame>
  83. <Frame Style="{StaticResource NoUnderlineEntryFrameStyle}" WidthRequest="178" Margin="3,0,0,0">
  84. <Grid MinimumHeightRequest="50" >
  85. <Grid.ColumnDefinitions>
  86. <ColumnDefinition Width="1"/>
  87. <ColumnDefinition Width="*"/>
  88. </Grid.ColumnDefinitions>
  89. <custom:NoUnderlineEntry Grid.Column="1"
  90. x:Name="LastName"
  91. FontSize="20"
  92. Keyboard="Text"
  93. Text="{Binding LastName}"
  94. Placeholder="Last Name"
  95. Style="{StaticResource EntryStyle}"/>
  96. </Grid>
  97. </Frame>
  98. </StackLayout>
  99. <Frame Style="{StaticResource NoUnderlineEntryFrameStyle}" Margin="15,5,15,5">
  100. <Grid MinimumHeightRequest="50" >
  101. <Grid.ColumnDefinitions>
  102. <ColumnDefinition Width="1"/>
  103. <ColumnDefinition Width="*"/>
  104. </Grid.ColumnDefinitions>
  105. <custom:NoUnderlineEntry Grid.Column="1"
  106. x:Name="PhoneNumber"
  107. FontSize="20"
  108. Keyboard="Telephone"
  109. MaxLength="10"
  110. Text="{Binding PhoneNumber}"
  111. Placeholder="Mobile Number"
  112. Style="{StaticResource EntryStyle}"/>
  113. </Grid>
  114. </Frame>
  115. <Frame Style="{StaticResource NoUnderlineEntryFrameStyle}" Margin="15,5,15,5">
  116. <Grid MinimumHeightRequest="50" >
  117. <Grid.ColumnDefinitions>
  118. <ColumnDefinition Width="1"/>
  119. <ColumnDefinition Width="*"/>
  120. </Grid.ColumnDefinitions>
  121. <custom:NoUnderlineEntry Grid.Column="1"
  122. x:Name="Password"
  123. FontSize="20"
  124. Keyboard="Text"
  125. Text="{Binding Password}"
  126. Placeholder="Password"
  127. IsPassword="True"
  128. Style="{StaticResource EntryStyle}"/>
  129. </Grid>
  130. </Frame>
  131. <Frame Style="{StaticResource NoUnderlineEntryFrameStyle}" Margin="15,5,15,5">
  132. <Grid MinimumHeightRequest="50" >
  133. <Grid.ColumnDefinitions>
  134. <ColumnDefinition Width="1"/>
  135. <ColumnDefinition Width="*"/>
  136. </Grid.ColumnDefinitions>
  137. <custom:NoUnderlineEntry Grid.Column="1"
  138. x:Name="Email"
  139. FontSize="20"
  140. Keyboard="Email"
  141. Text="{Binding Email}"
  142. Placeholder="Email"
  143. Style="{StaticResource EntryStyle}"/>
  144. </Grid>
  145. </Frame>
  146. <Label Text="{Binding ErrorMessage}"
  147. HorizontalTextAlignment="Center"
  148. FontSize="20"
  149. TextColor="Red"/>
  150. </StackLayout>
  151. </ScrollView>
  152. <Grid Margin="20,30,20,0"
  153. MinimumHeightRequest="40"
  154. VerticalOptions="EndAndExpand">
  155. <ActivityIndicator IsRunning="True" IsVisible="{Binding IsBusy}"/>
  156. <Button Text="SignUp"
  157. FontSize="20"
  158. Command="{Binding SignUpCommand}"
  159. IsVisible="{Binding IsBusy}"
  160. MinimumHeightRequest="40" Margin="0,16,0,10">
  161. <Button.Triggers>
  162. <DataTrigger TargetType="Button" Binding="{Binding IsBusy}" Value="False">
  163. <Setter Property="IsVisible" Value="True" />
  164. </DataTrigger>
  165. <DataTrigger TargetType="Button" Binding="{Binding IsBusy}" Value="True">
  166. <Setter Property="IsVisible" Value="False" />
  167. </DataTrigger>
  168. </Button.Triggers>
  169. </Button>
  170. </Grid>
  171. </StackLayout>
  172. </ContentPage.Content>
  173. </ContentPage>