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.

93 lines
4.6 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.TaxiInstallPage"
  5. xmlns:vm="clr-namespace:GMCabsDriverAssistantSolution.ViewModels"
  6. xmlns:custom="clr-namespace:GMCabsDriverAssistantSolution.CustomControls"
  7. Shell.FlyoutBehavior="Disabled"
  8. Shell.NavBarIsVisible="False">
  9. <ContentPage.BindingContext>
  10. <vm:TaxiInstallViewModel />
  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="4,8,4,4"></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 Orientation="Vertical"
  37. BackgroundColor="#DCDCDC">
  38. <StackLayout.Padding>
  39. <OnPlatform x:TypeArguments="Thickness">
  40. <On Platform="Android">20</On>
  41. <On Platform="iOS">20,60</On>
  42. </OnPlatform>
  43. </StackLayout.Padding>
  44. <Image Source="gmlogo_tablet.png"
  45. Margin="48,30,48,12"
  46. Scale="1.2"/>
  47. <Frame Style="{StaticResource NoUnderlineEntryFrameStyle}">
  48. <Grid MinimumHeightRequest="50">
  49. <Grid.ColumnDefinitions>
  50. <ColumnDefinition Width="*"/>
  51. </Grid.ColumnDefinitions>
  52. <custom:NoUnderlineEntry x:Name="Pin"
  53. Grid.Column="0"
  54. FontSize="20"
  55. Keyboard="Text"
  56. Text="{Binding TaxiNumber}"
  57. Placeholder="Taxi No Installed To"
  58. IsPassword="False"
  59. Style="{StaticResource EntryStyle}"/>
  60. </Grid>
  61. </Frame>
  62. <Grid Margin="20,30,20,0"
  63. MinimumHeightRequest="40">
  64. <ActivityIndicator IsRunning="True" IsVisible="{Binding IsBusy}"/>
  65. <Button Text="Save"
  66. FontSize="20"
  67. Command="{Binding SaveCommand}"
  68. IsVisible="{Binding IsBusy}"
  69. MinimumHeightRequest="40">
  70. <Button.Triggers>
  71. <DataTrigger TargetType="Button" Binding="{Binding IsBusy}" Value="False">
  72. <Setter Property="IsVisible" Value="True" />
  73. </DataTrigger>
  74. <DataTrigger TargetType="Button" Binding="{Binding IsBusy}" Value="True">
  75. <Setter Property="IsVisible" Value="False" />
  76. </DataTrigger>
  77. </Button.Triggers>
  78. </Button>
  79. </Grid>
  80. <Label Text="{Binding ErrorMessage}"
  81. HorizontalTextAlignment="Center"
  82. FontSize="20"
  83. TextColor="Red"/>
  84. <Button Text="Back"
  85. FontSize="20"
  86. Margin="20,16,20,0"
  87. CharacterSpacing="5"
  88. Command="{Binding BackCommand}"
  89. VerticalOptions="EndAndExpand"/>
  90. </StackLayout>
  91. </ContentPage.Content>
  92. </ContentPage>