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.

75 lines
4.4 KiB

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.UserRegistrationVerifyOtpPage"
  5. xmlns:vm="clr-namespace:GMCabsDriverAssistantSolution.ViewModels"
  6. xmlns:custom="clr-namespace:GMCabsDriverAssistantSolution.CustomControls"
  7. Shell.FlyoutBehavior="Disabled"
  8. Title="UserRegistrationVerifyOtpPage">
  9. <ContentPage.BindingContext>
  10. <vm:UserRegistrationVerifyOtpViewModel />
  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. </Style>
  20. <Style x:Key="NoUnderlineEntryFrameStyle" TargetType="Frame">
  21. <Setter Property="Padding">
  22. <OnPlatform x:TypeArguments="Thickness">
  23. <On Platform="Android">16,4</On>
  24. <On Platform="iOS">16</On>
  25. </OnPlatform>
  26. </Setter>
  27. <Setter Property="CornerRadius" Value="12"></Setter>
  28. <Setter Property="Margin" Value="0,16,0,0"></Setter>
  29. <Setter Property="HasShadow" Value="True"></Setter>
  30. <Setter Property="MinimumHeightRequest" Value="50" />
  31. <Setter Property="BackgroundColor" Value="White" />
  32. </Style>
  33. </ResourceDictionary>
  34. </ContentPage.Resources>
  35. <ContentPage.Content>
  36. <StackLayout Padding="16"
  37. Orientation="Vertical"
  38. BackgroundColor="#DCDCDC">
  39. <Label Text="User Registration"
  40. HorizontalOptions="CenterAndExpand"
  41. FontSize="Title"
  42. TextColor="Black"/>
  43. <Label Text="{Binding PhoneNumber, StringFormat='Enter verification code from the SMS sent to {0}'}"
  44. FontSize="Medium"
  45. Margin="0,16,0,0"
  46. HorizontalOptions="CenterAndExpand"
  47. TextColor="Gray"/>
  48. <Grid Padding="30" Margin="{OnIdiom Tablet='270,0,270,0'}">
  49. <Grid.ColumnDefinitions>
  50. <ColumnDefinition Width="*"/>
  51. <ColumnDefinition Width="*"/>
  52. <ColumnDefinition Width="*"/>
  53. <ColumnDefinition Width="*"/>
  54. </Grid.ColumnDefinitions>
  55. <custom:OtpEntry x:Name="step1" Grid.Column="0" TextChanged="step1_TextChanged" Keyboard="Numeric" MaxLength="1" HorizontalTextAlignment="Center" BackgroundColor="#e5e5e5" TextColor="#6C63FF" FontFamily="fontbold" Text="{Binding Step1}"/>
  56. <custom:OtpEntry x:Name="step2" Grid.Column="1" TextChanged="step2_TextChanged" Keyboard="Numeric" MaxLength="1" HorizontalTextAlignment="Center" BackgroundColor="#e5e5e5" TextColor="#6C63FF" FontFamily="fontbold" Text="{Binding Step2}"/>
  57. <custom:OtpEntry x:Name="step3" Grid.Column="2" TextChanged="step3_TextChanged" Keyboard="Numeric" MaxLength="1" HorizontalTextAlignment="Center" BackgroundColor="#e5e5e5" TextColor="#6C63FF" FontFamily="fontbold" Text="{Binding Step3}"/>
  58. <custom:OtpEntry x:Name="step4" Grid.Column="3" TextChanged="step4_TextChanged" Keyboard="Numeric" MaxLength="1" HorizontalTextAlignment="Center" BackgroundColor="#e5e5e5" TextColor="#6C63FF" FontFamily="fontbold" Text="{Binding Step4}"/>
  59. </Grid>
  60. <Button Text="Verify OTP"
  61. FontSize="20"
  62. Margin="{OnIdiom Phone='0,32,0,0',Tablet='270,0,270,0'}"
  63. VerticalOptions="EndAndExpand"
  64. Command="{Binding VerifyOtp}"/>
  65. <Label Text="{Binding ErrorMessage}"
  66. TextColor="Red"
  67. HorizontalTextAlignment="Center"
  68. FontSize="20"
  69. VerticalOptions="EndAndExpand"/>
  70. <Button Text="Back"
  71. FontSize="20"
  72. Margin="{OnIdiom Phone='0,16,0,0',Tablet='270,0,270,0'}"
  73. Command="{Binding Back}"/>
  74. </StackLayout>
  75. </ContentPage.Content>
  76. </ContentPage>