LoginView.axaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:vm="using:YtYtAvalonia.ViewModels"
  5. x:DataType="vm:MainWindowViewModel"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. mc:Ignorable="d" d:DesignWidth="1920" d:DesignHeight="1080"
  8. x:Class="YtYtAvalonia.View.LoginView">
  9. <Grid Margin="0 230 0 0 ">
  10. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
  11. <StackPanel.Styles>
  12. <Style Selector="TextBox">
  13. <Setter Property="Background" Value="#F8FDFF"></Setter>
  14. <Setter Property="BorderBrush" Value="#008BC7"></Setter>
  15. <Setter Property="CornerRadius" Value="8"></Setter>
  16. <Setter Property="BorderThickness" Value="2"></Setter>
  17. <Setter Property="FontSize" Value="13"></Setter>
  18. <Setter Property="FontFamily" Value="Roboto"></Setter>
  19. </Style>
  20. <Style Selector="ComboBox">
  21. <Setter Property="Background" Value="#F8FDFF"></Setter>
  22. <Setter Property="BorderBrush" Value="#008BC7"></Setter>
  23. <Setter Property="CornerRadius" Value="8"></Setter>
  24. <Setter Property="BorderThickness" Value="2"></Setter>
  25. <Setter Property="FontSize" Value="13"></Setter>
  26. <Setter Property="FontFamily" Value="Roboto"></Setter>
  27. <Setter Property="Foreground" Value="Gray"></Setter>
  28. </Style>
  29. <Style Selector="Button:pointerover /template/ ContentPresenter">
  30. <Setter Property="Background" Value="#2B95BD"></Setter>
  31. </Style>
  32. <Style Selector="Button.Login:pointerover /template/ ContentPresenter">
  33. <Setter Property="Background" Value="White"></Setter>
  34. <Setter Property="Foreground" Value="#2B95BD"></Setter>
  35. </Style>
  36. </StackPanel.Styles>
  37. <TextBlock HorizontalAlignment="Center" Margin="0 0 0 30" FontFamily="Roboto" FontSize="25" FontWeight="Bold">Авторизация</TextBlock>
  38. <TextBox Text="{Binding LoginVM.Login}" Watermark="Логин" Width="360" FontSize="13" Margin="0 0 0 10" ></TextBox>
  39. <TextBox Text="{Binding LoginVM.Password}" Watermark="Пароль" PasswordChar="•" Width="360"></TextBox>
  40. <TextBlock Text="{Binding LoginVM.Message}" Margin="0 5 0 0" HorizontalAlignment="Center" FontFamily="Roboto" FontSize="13" Foreground="#A52C2C"></TextBlock>
  41. <Button HorizontalAlignment="Center" Margin="0 20 0 10" Width="230" Height="45" CornerRadius="10" Background="#38BFF2" Command="{Binding LoadPersonalAccount}">
  42. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Roboto" FontSize="16" FontWeight="DemiBold" Foreground="White">Войти</TextBlock>
  43. </Button>
  44. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  45. <TextBlock Text="Нет аккаунта?" FontFamily="Roboto" FontSize="14" VerticalAlignment="Center"></TextBlock>
  46. <Button Classes="Login" FontFamily="Roboto" FontSize="14" Background="White" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).LoadRegistrationView}">Зарегистироваться</Button>
  47. </StackPanel>
  48. </StackPanel>
  49. </Grid>
  50. </UserControl>