RegistrationView.axaml 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. mc:Ignorable="d" d:DesignWidth="1920" d:DesignHeight="1080"
  7. x:Class="YtYtAvalonia.Views.RegistrationView"
  8. x:DataType="vm:MainWindowViewModel">
  9. <Grid>
  10. <StackPanel Margin="0 100 0 0" 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 RegVM.CurrentUser.Login}" Watermark="Логин" Width="360" FontSize="13" Margin="0 0 0 10" ></TextBox>
  39. <TextBox Text="{Binding RegVM.CurrentUser.Password}" Watermark="Пароль" PasswordChar="•" Width="360" ></TextBox>
  40. <TextBlock Margin="0 25 0 0" FontFamily="Roboto" FontSize="14">Личные данные:</TextBlock>
  41. <TextBox Text="{Binding RegVM.CurrentUser.Surname}" Watermark="Фамилия" Width="360" FontSize="13" Margin="0 10 0 10" ></TextBox>
  42. <TextBox Text="{Binding RegVM.CurrentUser.Name}" Watermark="Имя" Width="360" FontSize="13" Margin="0 0 0 10" ></TextBox>
  43. <TextBox Text="{Binding RegVM.CurrentUser.Patronymic}" Watermark="Отчество" Width="360" FontSize="13" Margin="0 0 0 25" ></TextBox>
  44. <TextBlock Margin="0 0 0 10" FontFamily="Roboto" FontSize="14">Дата рождения:</TextBlock>
  45. <StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Center">
  46. <DatePicker SelectedDate="{Binding RegVM.Birthday}" Width="360" CornerRadius="8" Background="#F8FDFF" BorderBrush="#008BC7" BorderThickness="2" FontFamily="Roboto"></DatePicker>
  47. </StackPanel>
  48. <TextBox Text="{Binding RegVM.CurrentUser.Email}" Watermark="Элетронная почта" Width="360" FontSize="13" Margin="0 25 0 10" ></TextBox>
  49. <TextBox Text="{Binding RegVM.CurrentUser.Phonenumber}" Watermark="Номер телефона" Width="360" FontSize="13" Margin="0 0 0 25" ></TextBox>
  50. <Button HorizontalAlignment="Center" Margin="0 20 0 10" Width="230" Height="45" CornerRadius="10" Background="#38BFF2" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).SaveData}">
  51. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Roboto" FontSize="16" FontWeight="DemiBold" Foreground="White">Зарегистироваться</TextBlock>
  52. </Button>
  53. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  54. <TextBlock Text="Уже есть аккаунт?" FontFamily="Roboto" FontSize="14" VerticalAlignment="Center"></TextBlock>
  55. <Button Classes="Login" FontFamily="Roboto" FontSize="14" Background="White" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).LoadLoginView}">Войти</Button>
  56. </StackPanel>
  57. </StackPanel>
  58. </Grid>
  59. </UserControl>