PersonalPage.axaml 1.7 KB

123456789101112131415161718192021222324252627282930
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:vm="using:AvaloniaApplicationPersonalPage.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="800" d:DesignHeight="450"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="AvaloniaApplicationPersonalPage.Views.PersonalPage">
  9. <Grid>
  10. <StackPanel>
  11. <TextBlock>Имя:</TextBlock>
  12. <TextBox Text="{Binding PersonalPage.CurrentUser.UserTable.Name}"></TextBox>
  13. <TextBlock>Логин:</TextBlock>
  14. <TextBox Text="{Binding PersonalPage.CurrentUser.Login}"></TextBox>
  15. <CheckBox IsChecked="{Binding PersonalPage.IsPasswordChange}">Изменить пароль?</CheckBox>
  16. <StackPanel IsVisible="{Binding PersonalPage.IsPasswordChange}">
  17. <TextBlock>Введите пароль</TextBlock>
  18. <TextBox PasswordChar="*" Text="{Binding PersonalPage.CurrentUser.Password, Mode=OneWayToSource}"></TextBox>
  19. <TextBlock>Подтвердите пароль</TextBlock>
  20. <TextBox PasswordChar="*" Text="{Binding PersonalPage.RepeatPassword}"></TextBox>
  21. </StackPanel>
  22. <TextBlock>Дата:</TextBlock>
  23. <DatePicker SelectedDate="{Binding PersonalPage.DR}"></DatePicker>
  24. <TextBlock>Пол:</TextBlock>
  25. <ComboBox ItemsSource="{Binding PersonalPage.Genders}" SelectedItem="{Binding PersonalPage.SelectedGender}"></ComboBox>
  26. <Button Command="{Binding PersonalPage.SaveData}">Сохранить изменения</Button>
  27. <TextBlock Text="{Binding PersonalPage.Message}"></TextBlock>
  28. </StackPanel>
  29. </Grid>
  30. </UserControl>