PageUserCabinet.axaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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:AvaloniaApplication5.ViewModels"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="AvaloniaApplication5.Views.PageUserCabinet">
  9. <StackPanel>
  10. <TextBlock Text="Имя"/>
  11. <TextBox Text="{Binding PageUCabinetVM.CurrentUser.User.Name}"/>
  12. <TextBlock Text="Логин"/>
  13. <TextBox Text="{Binding PageUCabinetVM.CurrentUser.Login}"/>
  14. <CheckBox Content="Изменить пароль" IsChecked="{Binding PageUCabinetVM.ChangePass}" IsEnabled="{Binding !PageUCabinetVM.ChangePass}"/>
  15. <StackPanel IsVisible="{Binding PageUCabinetVM.ChangePass}">
  16. <TextBlock Text="Введите новый пароль"/>
  17. <TextBox Text="{Binding PageUCabinetVM.CurrentUser.Password,Mode=OneWayToSource}" PasswordChar="•"/>
  18. <TextBlock Text="Повторите пароль"/>
  19. <TextBox Text="{Binding PageUCabinetVM.PasswordMatch}" PasswordChar="•"/>
  20. </StackPanel>
  21. <TextBlock Text="Роль в системе"/>
  22. <TextBlock Text="{Binding PageUCabinetVM.CurrentUser.IdRoleNavigation.Role1}"/>
  23. <TextBlock Text="Пол"/>
  24. <ComboBox ItemsSource="{Binding PageUCabinetVM.Genders}" SelectedValue="{Binding PageUCabinetVM.CurrentUser.User.IdGenderNavigation}">
  25. <ComboBox.ItemTemplate>
  26. <DataTemplate>
  27. <TextBlock Text="{Binding Gender1}"/>
  28. </DataTemplate>
  29. </ComboBox.ItemTemplate>
  30. </ComboBox>
  31. <TextBlock Text="Дата рождения"/>
  32. <DatePicker SelectedDate="{Binding PageUCabinetVM.DR}"/>
  33. <TextBlock Text="{Binding PageUCabinetVM.Message}"/>
  34. <Button Content="Сохранить изменения" Command="{Binding PageUCabinetVM.SaveData}"/>
  35. <Button Content="К списку пользователей" />
  36. </StackPanel>
  37. </UserControl>