DateUser.axaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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:TestRepeat.ViewModels"
  7. x:DataType="vm:DateUserViewModel"
  8. x:Class="TestRepeat.Views.DateUser">
  9. <StackPanel>
  10. <TextBox
  11. Text="{Binding UserForPage.Name}"/>
  12. <TextBox
  13. Text="{Binding DateString}"/>
  14. <DatePicker
  15. SelectedDate="{Binding NewDate}"/>
  16. <StackPanel
  17. Orientation="Horizontal">
  18. <ComboBox
  19. ItemsSource="{Binding Genders}"
  20. SelectedItem="{Binding UserForPage.IdGenderNavigation}">
  21. <ComboBox.ItemTemplate>
  22. <DataTemplate>
  23. <TextBlock Text="{Binding Gender1}"/>
  24. </DataTemplate>
  25. </ComboBox.ItemTemplate>
  26. </ComboBox>
  27. <ComboBox
  28. ItemsSource="{Binding IdNotThreats}"
  29. SelectedItem="{Binding SelectedThreat}">
  30. <ComboBox.ItemTemplate>
  31. <DataTemplate>
  32. <TextBlock
  33. Text="{Binding Name}"/>
  34. </DataTemplate>
  35. </ComboBox.ItemTemplate>
  36. </ComboBox>
  37. </StackPanel>
  38. <StackPanel
  39. Orientation="Horizontal">
  40. <Button
  41. Content="Добавить качество"
  42. Command="{Binding AddThreat}"
  43. />
  44. <Button
  45. Content="Удалить качество"
  46. Command="{Binding DeleteThreatUser}"
  47. />
  48. </StackPanel>
  49. <TextBlock
  50. Foreground="Red"
  51. IsVisible="{Binding IsCanDeleteThreat}"
  52. Text="Сначала выделите качество из списка, нажав на него"/>
  53. <ListBox ItemsSource="{Binding IdThreats}"
  54. SelectedItem="{Binding SelectedItem}">
  55. <ListBox.ItemTemplate>
  56. <DataTemplate>
  57. <TextBlock Text="{Binding Name}"/>
  58. </DataTemplate>
  59. </ListBox.ItemTemplate>
  60. </ListBox>
  61. <Image
  62. Source="{Binding ImgUser}"
  63. Width="150"
  64. Height="150"/>
  65. <Button
  66. Content="Изменить аватар"
  67. Command="{Binding ChangeImg}"/>
  68. <Button
  69. Content="Сохранить данные"
  70. Command="{Binding SaveChange}"/>
  71. <Button
  72. Content="На начальный экран"
  73. Command="{Binding BackToAuth}"/>
  74. <Button
  75. IsVisible="{Binding IsAdmin}"
  76. Content="На список пользователей"
  77. Command="{Binding BackToListUser}"/>
  78. </StackPanel>
  79. </UserControl>