PersonalInformation.axaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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:AvaloniaTeachersDB.ViewModels"
  6. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  7. x:Class="AvaloniaTeachersDB.Views.PersonalInformation"
  8. x:DataType="vm:MainWindowViewModel">
  9. <UserControl.Styles>
  10. <Style Selector="TextBlock">
  11. <Setter Property="FontSize" Value="18"/>
  12. <Setter Property="TextWrapping" Value="NoWrap"/>
  13. </Style>
  14. </UserControl.Styles>
  15. <Grid>
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="40"/>
  18. <RowDefinition/>
  19. </Grid.RowDefinitions>
  20. <Button Height="30" Content="Добавить" Margin="10,0,0,0" Command="{Binding ToAdd}"/>
  21. <ListBox Grid.Row="1" ItemsSource="{Binding PersonInf.listTeachers}" ScrollViewer.VerticalScrollBarVisibility="Auto">
  22. <ListBox.ItemTemplate>
  23. <DataTemplate>
  24. <Border BorderBrush="Black" BorderThickness="2" Padding="20">
  25. <Grid ColumnDefinitions="*, *">
  26. <StackPanel Grid.Column="0">
  27. <TextBlock FontWeight="Bold" Text="Личная информация:"/>
  28. <TextBlock Text="{Binding FIO}"/>
  29. <TextBlock Text="{Binding strGender}"/>
  30. <TextBlock Text="{Binding strBirthday}"/>
  31. <TextBlock Text="{Binding strExperience}"/>
  32. <TextBlock FontWeight="Bold" Text="Контактная информация: "/>
  33. <StackPanel Orientation="Horizontal">
  34. <TextBlock Text="{Binding strEmail}" Margin="0,0,15,0"/>
  35. <TextBlock Text="{Binding strPhone}"/>
  36. </StackPanel>
  37. <TextBlock FontWeight="Bold" Text="{Binding Allhourse}"/>
  38. <ItemsRepeater ItemsSource="{Binding CollectionCourse}"/>
  39. </StackPanel>
  40. <StackPanel Grid.Column="1">
  41. <TextBlock FontWeight="Bold" Text="Преподаваемые предметы:"/>
  42. <ItemsRepeater ItemsSource="{Binding CollectionSubject}"/>
  43. </StackPanel>
  44. </Grid>
  45. </Border>
  46. </DataTemplate>
  47. </ListBox.ItemTemplate>
  48. </ListBox>
  49. </Grid>
  50. </UserControl>