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.

102 lines
5.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.UserRegistrationUpdateDriverPinPage"
  5. xmlns:vm="clr-namespace:GMCabsDriverAssistantSolution.ViewModels"
  6. xmlns:custom="clr-namespace:GMCabsDriverAssistantSolution.CustomControls"
  7. Shell.FlyoutBehavior="Disabled">
  8. <ContentPage.BindingContext>
  9. <vm:UserRegistrationUpdateDriverPinViewModel />
  10. </ContentPage.BindingContext>
  11. <ContentPage.Resources>
  12. <ResourceDictionary>
  13. <Style x:Key="EntryStyle" TargetType="Entry">
  14. <Setter Property="TextColor" Value="#000"></Setter>
  15. <Setter Property="PlaceholderColor" Value="#9999"></Setter>
  16. <Setter Property="TranslationY" Value="1" />
  17. <Setter Property="MinimumHeightRequest" Value="36" />
  18. </Style>
  19. <Style x:Key="NoUnderlineEntryFrameStyle" TargetType="Frame">
  20. <Setter Property="Padding">
  21. <OnPlatform x:TypeArguments="Thickness">
  22. <On Platform="Android">16,4</On>
  23. <On Platform="iOS">16</On>
  24. </OnPlatform>
  25. </Setter>
  26. <Setter Property="CornerRadius" Value="12"></Setter>
  27. <Setter Property="Margin" Value="0,16,0,0"></Setter>
  28. <Setter Property="HasShadow" Value="True"></Setter>
  29. <Setter Property="MinimumHeightRequest" Value="50" />
  30. <Setter Property="BackgroundColor" Value="White" />
  31. </Style>
  32. </ResourceDictionary>
  33. </ContentPage.Resources>
  34. <ContentPage.Content>
  35. <StackLayout Padding="16"
  36. Orientation="Vertical"
  37. BackgroundColor="#DCDCDC">
  38. <Label Text="User Registration"
  39. FontSize="Title"
  40. TextColor="Black"
  41. HorizontalOptions="CenterAndExpand"/>
  42. <Label Text="Enter Driver Pin and Register"
  43. FontSize="Medium"
  44. Margin="0,16,0,0"
  45. TextColor="Gray"
  46. HorizontalOptions="CenterAndExpand"/>
  47. <Frame Style="{StaticResource NoUnderlineEntryFrameStyle}" Margin="{OnIdiom Tablet='270,0,270,0'}">
  48. <Grid MinimumHeightRequest="50">
  49. <Grid.ColumnDefinitions>
  50. <ColumnDefinition Width="36"/>
  51. <ColumnDefinition Width="*"/>
  52. </Grid.ColumnDefinitions>
  53. <Image Source="key_pad_image.png"
  54. HeightRequest="36"
  55. WidthRequest="36"
  56. Aspect="AspectFit"/>
  57. <custom:NoUnderlineEntry x:Name="Pin"
  58. Grid.Column="1"
  59. FontSize="20"
  60. Keyboard="Numeric"
  61. Text="{Binding Pin}"
  62. Placeholder="Pin"
  63. IsPassword="True"
  64. Style="{StaticResource EntryStyle}"/>
  65. </Grid>
  66. </Frame>
  67. <Frame Style="{StaticResource NoUnderlineEntryFrameStyle}" Margin="{OnIdiom Tablet='270,0,270,0'}">
  68. <Grid MinimumHeightRequest="50">
  69. <Grid.ColumnDefinitions>
  70. <ColumnDefinition Width="36"/>
  71. <ColumnDefinition Width="*"/>
  72. </Grid.ColumnDefinitions>
  73. <Image Source="key_pad_image.png"
  74. HeightRequest="36"
  75. WidthRequest="36"
  76. Aspect="AspectFit"/>
  77. <custom:NoUnderlineEntry x:Name="ConfirmPin"
  78. Grid.Column="1"
  79. FontSize="20"
  80. Keyboard="Numeric"
  81. Text="{Binding ConfirmPin}"
  82. Placeholder="Confirm Pin"
  83. IsPassword="True"
  84. Style="{StaticResource EntryStyle}"/>
  85. </Grid>
  86. </Frame>
  87. <Button Text="Register"
  88. FontSize="20"
  89. Margin="{OnIdiom Phone='0,32,0,0',Tablet='270,0,270,0'}"
  90. VerticalOptions="EndAndExpand"
  91. Command="{Binding Register}"/>
  92. <Label Text="{Binding ErrorMessage}"
  93. TextColor="Red"
  94. HorizontalTextAlignment="Center"
  95. FontSize="20"
  96. VerticalOptions="EndAndExpand"/>
  97. <Button Text="Back"
  98. FontSize="20"
  99. Margin="{OnIdiom Phone='0,16,0,0',Tablet='270,0,270,0'}"
  100. Command="{Binding Back}"/>
  101. </StackLayout>
  102. </ContentPage.Content>
  103. </ContentPage>