Show.axaml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. xmlns:vm="using:AvaloniaApplicationBase.ViewModels"
  6. x:DataType="vm:show"
  7. mc:Ignorable="d"
  8. d:DesignWidth="800" d:DesignHeight="450"
  9. x:Class="AvaloniaApplicationBase.Show">
  10. <Grid HorizontalAlignment="Center" Background="White" Margin="20">
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="Auto" />
  13. <RowDefinition Height="*" />
  14. </Grid.RowDefinitions>
  15. <TextBlock Text="Список Преподавателей" FontSize="22" FontWeight="Bold" HorizontalAlignment="Center" Margin="0 0 0 20"/>
  16. <ListBox ItemsSource="{Binding TeacherList}" Grid.Row="1" Background="White" BorderThickness="0">
  17. <ListBox.ItemsPanel>
  18. <ItemsPanelTemplate>
  19. <WrapPanel />
  20. </ItemsPanelTemplate>
  21. </ListBox.ItemsPanel>
  22. <ListBox.ItemTemplate>
  23. <DataTemplate>
  24. <Border BorderThickness="1" BorderBrush="#E0E0E0" CornerRadius="8" Margin="10" Padding="15" Background="White" Effect="{StaticResource ShadowEffect}" Width="700">
  25. <StackPanel Orientation="Vertical">
  26. <TextBlock Text="Личная информация" FontWeight="Bold" FontSize="16" Margin="0 0 0 5"/>
  27. <StackPanel Orientation="Horizontal">
  28. <TextBlock Text="{Binding LastName}" FontSize="14" Margin="0 3"/>
  29. <TextBlock Text=" "/>
  30. <TextBlock Text="{Binding FirstName}" FontSize="14" Margin="0 3"/>
  31. <TextBlock Text=" "/>
  32. <TextBlock Text="{Binding PatronymicName}" FontSize="14" Margin="0 3"/>
  33. </StackPanel>
  34. <StackPanel Orientation="Horizontal">
  35. <TextBlock Text="Пол: " FontWeight="Medium" Margin="0 3"/>
  36. <TextBlock Text="{Binding Gender.GenderName}" Margin="0 3"/>
  37. </StackPanel>
  38. <StackPanel Orientation="Horizontal">
  39. <TextBlock Text="Дата рождения: " FontWeight="Medium" Margin="0 3"></TextBlock>
  40. <TextBlock Text="{Binding DateOfBirth, StringFormat=D}" Margin="0 3"/>
  41. </StackPanel>
  42. <StackPanel Orientation="Horizontal">
  43. <TextBlock Text="Стаж работы: " FontWeight="Medium" Margin="0 3"></TextBlock>
  44. <TextBlock Text="{Binding Experience}" Margin="0 3"/>
  45. <TextBlock Text=" месяцев." Margin="0 3"/>
  46. </StackPanel>
  47. <TextBlock Text="Контактная информация:" FontWeight="Bold" FontSize="16" Margin="0 5 0 5" />
  48. <StackPanel Orientation="Horizontal">
  49. <TextBlock Text="Почта: " FontWeight="Medium" Margin="0 3"></TextBlock>
  50. <TextBlock Text="{Binding Email}" Margin="0 3"/>
  51. </StackPanel>
  52. <StackPanel Orientation="Horizontal">
  53. <TextBlock Text="Телефон: " FontWeight="Medium" Margin="0 3"></TextBlock>
  54. <TextBlock Text="{Binding Phone}" Margin="0 3"/>
  55. </StackPanel>
  56. <TextBlock Text="{Binding count}" FontWeight="Medium" Margin="3 3"></TextBlock>
  57. <ItemsControl ItemsSource="{Binding TeacherCourses}">
  58. <ItemsControl.ItemTemplate>
  59. <DataTemplate>
  60. <TextBlock Text="{Binding Course.Name}" Foreground="#0078D7" Margin="3 3"/>
  61. </DataTemplate>
  62. </ItemsControl.ItemTemplate>
  63. </ItemsControl>
  64. <TextBlock Text="Преподаваемые дисциплины:" FontWeight="Bold" FontSize="16" Margin="3 5 0 5"/>
  65. <ItemsControl ItemsSource="{Binding TeacherDisciplines}" Margin="3 0">
  66. <ItemsControl.ItemTemplate>
  67. <DataTemplate>
  68. <TextBlock Text="{Binding Discipline.Name}" Foreground="#0078D7" Margin="0 3"/>
  69. </DataTemplate>
  70. </ItemsControl.ItemTemplate>
  71. </ItemsControl>
  72. </StackPanel>
  73. </Border>
  74. </DataTemplate>
  75. </ListBox.ItemTemplate>
  76. </ListBox>
  77. </Grid>
  78. </UserControl>