MainWindow.xaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <Window x:Class="WpfApp1.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WpfApp1"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="450" Width="800">
  9. <Grid ShowGridLines="True">
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="auto"/>
  12. <RowDefinition />
  13. <RowDefinition Height="auto"/>
  14. </Grid.RowDefinitions>
  15. <Grid.ColumnDefinitions>
  16. <ColumnDefinition Width="200"/>
  17. <ColumnDefinition/>
  18. </Grid.ColumnDefinitions>
  19. <Image
  20. Source="1.jpeg"
  21. Grid.RowSpan="2" HorizontalAlignment="Right"/>
  22. <DataGrid
  23. Grid.Row="1"
  24. Grid.Column="1"
  25. CanUserAddRows="False"
  26. AutoGenerateColumns="False"
  27. ItemsSource="{Binding WorkerList}">
  28. <DataGrid.Columns>
  29. <DataGridTextColumn
  30. Header="Имя"
  31. Binding="{Binding name}"/>
  32. <DataGridTextColumn
  33. Header="Возраст"
  34. Binding="{Binding Age}"/>
  35. <DataGridTextColumn
  36. Header="Должность"
  37. Binding="{Binding Pos}"/>
  38. <DataGridTextColumn
  39. Header="Пол"
  40. Binding="{Binding Sex}"/>
  41. </DataGrid.Columns>
  42. </DataGrid>
  43. <StackPanel
  44. Orientation="Vertical"
  45. Grid.RowSpan="3"
  46. VerticalAlignment="Bottom">
  47. <Button
  48. x:Name="ExitButton"
  49. Content="Выход"
  50. Click="ExitButton_Click"
  51. Height="50"/>
  52. </StackPanel>
  53. <WrapPanel
  54. Orientation="Horizontal"
  55. Grid.Column="1"
  56. MinHeight="50">
  57. <Label
  58. Content="Должность:"
  59. VerticalAlignment="Center"/>
  60. <ComboBox
  61. Name="PosFilterComboBox"
  62. SelectionChanged="PosFilterComboBox_SelectionChanged_1"
  63. VerticalAlignment="Center"
  64. MinWidth="100"
  65. SelectedIndex="0"
  66. ItemsSource="{Binding WorkerPosList}">
  67. <ComboBox.ItemTemplate>
  68. <DataTemplate>
  69. <Label
  70. Content="{Binding title}"/>
  71. </DataTemplate>
  72. </ComboBox.ItemTemplate>
  73. </ComboBox>
  74. <Label
  75. Content="Возраст:"
  76. VerticalAlignment="Center"/>
  77. <ComboBox
  78. Name="AgeFilterComboBox"
  79. SelectionChanged="AgeFilterComboBox_SelectionChanged_2"
  80. VerticalAlignment="Center"
  81. MinWidth="100"
  82. SelectedIndex="0"
  83. ItemsSource="{Binding WorkerAgeList}">
  84. <ComboBox.ItemTemplate>
  85. <DataTemplate>
  86. <Label
  87. Content="{Binding title}"/>
  88. </DataTemplate>
  89. </ComboBox.ItemTemplate>
  90. </ComboBox>
  91. <Label
  92. Content="Пол"
  93. VerticalAlignment="Center"/>
  94. <ComboBox
  95. Name="SexFilterComboBox"
  96. SelectionChanged="SexFilterComboBox_SelectionChanged_3"
  97. VerticalAlignment="Center"
  98. MinWidth="100"
  99. SelectedIndex="0"
  100. ItemsSource="{Binding WorkerSexList}">
  101. <ComboBox.ItemTemplate>
  102. <DataTemplate>
  103. <Label
  104. Content="{Binding title}"/>
  105. </DataTemplate>
  106. </ComboBox.ItemTemplate>
  107. </ComboBox>
  108. </WrapPanel>
  109. </Grid>
  110. </Window>