LoginPage.xaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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="practiceApplicaiton.LoginPage"
  5. Title="Вход в систему"
  6. BackgroundColor="#F5F7FA">
  7. <VerticalStackLayout Padding="60" Spacing="20" VerticalOptions="Center">
  8. <Label Text="Гостиничный корпус"
  9. FontSize="28" FontAttributes="Bold"
  10. HorizontalOptions="Center" TextColor="#2E4057"/>
  11. <Label Text="Вход в систему" FontSize="16"
  12. HorizontalOptions="Center" TextColor="#666"/>
  13. <Frame BackgroundColor="LightGray" CornerRadius="12" Padding="24"
  14. BorderColor="#E0E0E0" HasShadow="True">
  15. <VerticalStackLayout Spacing="16">
  16. <Label Text="Роль" FontAttributes="Bold" TextColor="#2E4057"/>
  17. <Picker x:Name="RolePicker" Title="Выберите роль">
  18. <Picker.Items>
  19. <x:String>Администратор</x:String>
  20. <x:String>Менеджер</x:String>
  21. </Picker.Items>
  22. </Picker>
  23. <Label Text="Пароль" FontAttributes="Bold" TextColor="#2E4057"/>
  24. <Entry x:Name="PasswordEntry" IsPassword="True"
  25. Placeholder="Введите пароль"
  26. ReturnCommand="{Binding LoginCommand}"/>
  27. <Label x:Name="ErrorLabel" TextColor="Red"
  28. IsVisible="False" HorizontalOptions="Center"/>
  29. <Button x:Name="LoginButton"
  30. Text="Войти"
  31. BackgroundColor="#4472C4"
  32. TextColor="White"
  33. CornerRadius="8"
  34. Clicked="OnLoginClicked"/>
  35. </VerticalStackLayout>
  36. </Frame>
  37. </VerticalStackLayout>
  38. </ContentPage>