DataTeachers.axaml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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:scool.ViewModels"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="scool.Views.DataTeachers">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="*"/>
  12. <RowDefinition Height="10*"/>
  13. </Grid.RowDefinitions>
  14. <Button Command="{Binding ToAdd}" Grid.Row="0" HorizontalAlignment="Right">Добавить преподавателя</Button>
  15. <ListBox ItemsSource="{Binding DataTeachersVM.TeachersData}" Grid.Row="1">
  16. <ListBox.ItemTemplate>
  17. <DataTemplate>
  18. <Border CornerRadius="5" BorderBrush="DarkRed" BorderThickness="2" Padding="15">
  19. <StackPanel 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. <TextBlock Margin="20,0,0,0">Телефон:</TextBlock>
  44. <TextBlock Margin="5,0,0,0" Text="{Binding Phone}"></TextBlock>
  45. </StackPanel>
  46. <TextBlock FontWeight="Bold">Курс в общем объёме 180 часов:</TextBlock>
  47. <ItemsRepeater ItemsSource="{Binding newCourses}"></ItemsRepeater>
  48. </StackPanel>
  49. <StackPanel Orientation="Vertical">
  50. <TextBlock FontWeight="Bold">Преподаваемые предметы:</TextBlock>
  51. <ItemsRepeater ItemsSource="{Binding newSubjects}"></ItemsRepeater>
  52. </StackPanel>
  53. </StackPanel>
  54. </Border>
  55. </DataTemplate>
  56. </ListBox.ItemTemplate>
  57. </ListBox>
  58. </Grid>
  59. </UserControl>