RegistrationPage.axaml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:vm="using:FinancialManagement.ViewModels"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. mc:Ignorable="d" d:DesignWidth="1600" d:DesignHeight="1080"
  7. x:Class="FinancialManagement.Views.RegistrationPage"
  8. x:DataType="vm:MainWindowViewModel">
  9. <UserControl.Styles>
  10. <Style Selector="TextBox">
  11. <Setter Property="FontFamily" Value="{StaticResource Nunito}" />
  12. <Setter Property="Foreground" Value="#7471E8" />
  13. <Setter Property="CornerRadius" Value="6" />
  14. <Setter Property="BorderThickness" Value="0" />
  15. </Style>
  16. <Style Selector="TextBlock">
  17. <Setter Property="FontFamily" Value="{StaticResource NunitoBold}" />
  18. </Style>
  19. <Style Selector="Button">
  20. <Setter Property="FontFamily" Value="{StaticResource NunitoBold}" />
  21. </Style>
  22. </UserControl.Styles>
  23. <Panel Background="#7471E8">
  24. <StackPanel Orientation="Horizontal">
  25. <Image
  26. Source="avares://FinancialManagement/Assets/BackroundFon.png"
  27. Stretch="Fill"
  28. HorizontalAlignment="Center"
  29. VerticalAlignment="Center"
  30. Width="1550"/>
  31. </StackPanel>
  32. <StackPanel
  33. HorizontalAlignment="Center"
  34. Orientation="Vertical"
  35. VerticalAlignment="Center">
  36. <Border
  37. HorizontalAlignment="Center"
  38. VerticalAlignment="Center"
  39. Grid.Row="0" Grid.Column="1"
  40. Background="#E3E6FF"
  41. CornerRadius="10"
  42. Padding="0 0 0 0"
  43. Width="644"
  44. Height="780">
  45. <StackPanel
  46. Orientation="Vertical"
  47. VerticalAlignment="Top"
  48. Width="550">
  49. <TextBlock
  50. FontSize="64"
  51. Foreground="#000000"
  52. HorizontalAlignment="Center"
  53. Margin="30 10 30 40"
  54. Text="Регистрация"/>
  55. <TextBox
  56. FontSize="24"
  57. Watermark="Имя пользователя"
  58. Padding="10 20 0 20"
  59. Margin="0 -20 0 30"
  60. Text="{Binding RegistrationPageVM.NewUser.Username}"/>
  61. <TextBox
  62. FontSize="24"
  63. Watermark="Логин"
  64. Padding="10 20 0 20"
  65. Margin="0 0 0 30"
  66. Text="{Binding RegistrationPageVM.NewUser.Login}"/>
  67. <TextBox
  68. FontSize="24"
  69. Watermark="Телефон"
  70. Padding="10 20 0 20"
  71. Margin="0 0 0 30"
  72. Text="{Binding RegistrationPageVM.NewUser.Phone}"/>
  73. <StackPanel HorizontalAlignment="Right">
  74. <Button
  75. Background="Transparent"
  76. FontSize="18"
  77. Foreground="#7471E8"
  78. Content="Показать пароль"
  79. Margin="0 -10 0 -5"
  80. Command="{Binding ShowHidePasswordRegistration}">
  81. <Button.Styles>
  82. <Style Selector="Button:pointerover /template/ ContentPresenter">
  83. <Setter Property="Background" Value="Transparent"></Setter>
  84. <Setter Property="Foreground" Value="#30DD6B"></Setter>
  85. </Style>
  86. </Button.Styles>
  87. </Button>
  88. </StackPanel>
  89. <TextBox
  90. FontSize="24"
  91. Watermark="Пароль"
  92. PasswordChar="{Binding RegistrationPageVM.PasswordChar}"
  93. Padding="10 20 0 20"
  94. Margin="0 0 0 30"
  95. Text="{Binding RegistrationPageVM.NewUser.Password}"/>
  96. <TextBox
  97. FontSize="24"
  98. Watermark="Повтор пароля"
  99. PasswordChar="{Binding RegistrationPageVM.PasswordChar}"
  100. Padding="10 20 0 20"
  101. Margin="0 0 0 10"
  102. Text="{Binding RegistrationPageVM.RepeatInputPassword}"/>
  103. <TextBlock
  104. FontSize="24"
  105. Foreground="Red"
  106. HorizontalAlignment="Center"
  107. Margin="0 10 0 10"
  108. Text="{Binding RegistrationPageVM.Message}"/>
  109. <StackPanel
  110. Orientation="Horizontal"
  111. HorizontalAlignment="Center"
  112. VerticalAlignment="Center">
  113. <Button
  114. CornerRadius="10"
  115. Content="Назад"
  116. Background="#7471E8"
  117. Foreground="White"
  118. FontSize="30"
  119. Padding="20 10 20 10"
  120. HorizontalAlignment="Stretch"
  121. HorizontalContentAlignment="Center"
  122. Margin="0 0 40 30"
  123. Command="{Binding ToAuthorizathionPage}">
  124. <Button.Styles>
  125. <Style Selector="Button:pointerover /template/ ContentPresenter">
  126. <Setter Property="Background" Value="#A3A0FB"></Setter>
  127. <Setter Property="Foreground" Value="White"></Setter>
  128. </Style>
  129. </Button.Styles>
  130. </Button>
  131. <Button
  132. CornerRadius="10"
  133. Content="Зарегистрироваться"
  134. Background="#7471E8"
  135. Foreground="White"
  136. FontSize="30"
  137. Padding="20 10 20 10"
  138. HorizontalAlignment="Stretch"
  139. HorizontalContentAlignment="Center"
  140. Margin="0 0 0 30"
  141. Command="{Binding RegistrationInDB}">
  142. <Button.Styles>
  143. <Style Selector="Button:pointerover /template/ ContentPresenter">
  144. <Setter Property="Background" Value="#A3A0FB"></Setter>
  145. <Setter Property="Foreground" Value="White"></Setter>
  146. </Style>
  147. </Button.Styles>
  148. </Button>
  149. </StackPanel>
  150. </StackPanel>
  151. </Border>
  152. </StackPanel>
  153. </Panel>
  154. </UserControl>