PageUserCabinet.axaml 2.2 KB

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