Page3.axaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435
  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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  6. xmlns:vm="using:AvaloniaExample.ViewModels"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="AvaloniaExample.Views.Page3">
  9. <UserControl.Styles>
  10. <Style Selector="TextBox.prettyBlock">
  11. <Setter Property="Width" Value="390"/>
  12. <Setter Property="HorizontalAlignment" Value="Left"/>
  13. </Style>
  14. <Style Selector="TextBlock.prettyText">
  15. <Setter Property="FontWeight" Value="Bold"/>
  16. <Setter Property="Margin" Value="0 5"/>
  17. </Style>
  18. </UserControl.Styles>
  19. <StackPanel>
  20. <TextBlock Classes="prettyText" Text="Личный кабинет пользователя"/>
  21. <TextBlock Classes="prettyText" Text="Имя"/>
  22. <TextBox Classes="prettyBlock" Text="{Binding Page3VM.UserInf.UsersInfo.Name}"/>
  23. <TextBlock Classes="prettyText" Text="Пол" />
  24. <ComboBox ItemsSource="{Binding Page3VM.GenderList}" SelectedItem="{Binding Page3VM.UserInf.UsersInfo.Gender}"/>
  25. <TextBlock Classes="prettyText" Text="Дата рождения"/>
  26. <DatePicker SelectedDate="{Binding Page3VM.DateBirth}"/>
  27. <TextBlock Classes="prettyText" Text="Почта"/>
  28. <TextBox Classes="prettyBlock" Text="{Binding Page3VM.UserInf.UsersInfo.Mail}"/>
  29. <TextBlock Classes="prettyText" Text="Номер телефона"/>
  30. <TextBox Classes="prettyBlock" Text="{Binding Page3VM.UserInf.UsersInfo.Phone}" />
  31. <TextBlock Classes="prettyText" Text="Роль в системе"/>
  32. <TextBox Classes="prettyBlock" Text="{Binding Page3VM.UserInf.Role}" IsEnabled="False"/>
  33. <Button Classes="prettyBlock" Content="Сохранить изменения" Command="{Binding SaveChanges}"/>
  34. </StackPanel>
  35. </UserControl>