DataTeacher.axaml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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="650" d:DesignHeight="450"
  6. xmlns:vm="using:AVSchool.ViewModels"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="AVSchool.Views.DataTeacher">
  9. <Grid Background="LightBlue">
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="*"/>
  12. <RowDefinition Height="10*"/>
  13. </Grid.RowDefinitions>
  14. <Button Command="{Binding ToAdd}" Margin="0 10 10 0" Grid.Row="0" HorizontalAlignment="Right">Добавить преподавателя</Button>
  15. <ListBox ItemsSource="{Binding DataTeacherVM.TeachersData}" Background="LightBlue" Grid.Row="1">
  16. <ListBox.ItemTemplate>
  17. <DataTemplate>
  18. <Border CornerRadius="5" BorderBrush="Blue" BorderThickness="2" Padding="15">
  19. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  20. <StackPanel Orientation="Vertical">
  21. <TextBlock FontWeight="Bold">Личная информация:</TextBlock>
  22. <StackPanel Orientation="Horizontal">
  23. <TextBlock Text="{Binding Name}"></TextBlock>
  24. <TextBlock Margin="5,0,0,0" Text="{Binding Patronymic}"></TextBlock>
  25. <TextBlock Margin="5,0,0,0" Text="{Binding Surname}"></TextBlock>
  26. </StackPanel>
  27. <StackPanel Orientation="Horizontal">
  28. <TextBlock>Пол:</TextBlock>
  29. <TextBlock Margin="5,0,0,0" Text="{Binding IdGenderNavigation.Gender1}"></TextBlock>
  30. </StackPanel>
  31. <StackPanel Orientation="Horizontal">
  32. <TextBlock>Дата рождения:</TextBlock>
  33. <TextBlock Margin="5,0,0,0" Text="{Binding newBirthdate}"></TextBlock>
  34. </StackPanel>
  35. <StackPanel Orientation="Horizontal">
  36. <TextBlock>Стаж работы:</TextBlock>
  37. <TextBlock Margin="5,0,0,0" Text="{Binding newExpirience}"></TextBlock>
  38. </StackPanel>
  39. <TextBlock FontWeight="Bold">Контактная информация:</TextBlock>
  40. <StackPanel Orientation="Horizontal">
  41. <TextBlock>Почта:</TextBlock>
  42. <TextBlock Margin="5,0,0,0" Text="{Binding Email}"></TextBlock>
  43. </StackPanel>
  44. <StackPanel Orientation="Horizontal">
  45. <TextBlock>Телефон:</TextBlock>
  46. <TextBlock Margin="5,0,0,0" Text="{Binding Phone}"></TextBlock>
  47. </StackPanel>
  48. <TextBlock FontWeight="Bold">Курс в общем объёме 180 часов:</TextBlock>
  49. <ItemsRepeater ItemsSource="{Binding newCourses}"></ItemsRepeater>
  50. </StackPanel>
  51. <StackPanel Orientation="Vertical">
  52. <TextBlock FontWeight="Bold">Преподаваемые предметы:</TextBlock>
  53. <ItemsRepeater ItemsSource="{Binding newSubjects}"></ItemsRepeater>
  54. </StackPanel>
  55. </StackPanel>
  56. </Border>
  57. </DataTemplate>
  58. </ListBox.ItemTemplate>
  59. </ListBox>
  60. </Grid>
  61. </UserControl>