MainWindow.xaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. <Window.Resources>
  10. <BitmapImage
  11. x:Key='defaultImage'
  12. UriSource='C:\Users\User\Desktop\oap_labs\WpfApp1\bin\Debug\net8.0-windows\img\3.png' />
  13. </Window.Resources>
  14. <Grid ShowGridLines="True">
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="auto"/>
  17. <RowDefinition />
  18. <RowDefinition Height="auto"/>
  19. </Grid.RowDefinitions>
  20. <Grid.ColumnDefinitions>
  21. <ColumnDefinition Width="200"/>
  22. <ColumnDefinition/>
  23. </Grid.ColumnDefinitions>
  24. <Image
  25. Source ="1.jpeg"
  26. Grid.RowSpan="2" HorizontalAlignment="Right"/>
  27. <ListBox
  28. Grid.Column="1"
  29. Grid.Row="1"
  30. Background="White"
  31. ItemsSource="{Binding WorkerList}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  32. <ListBox.ItemsPanel>
  33. <ItemsPanelTemplate>
  34. <WrapPanel
  35. HorizontalAlignment="Center" />
  36. </ItemsPanelTemplate>
  37. </ListBox.ItemsPanel>
  38. <ListBox.ItemTemplate>
  39. <DataTemplate>
  40. <Border
  41. BorderThickness="1"
  42. BorderBrush="Black"
  43. CornerRadius="5">
  44. <Grid
  45. Width="200"
  46. Margin="10"
  47. HorizontalAlignment="Stretch">
  48. <Grid.ColumnDefinitions>
  49. <ColumnDefinition Width="64"/>
  50. <ColumnDefinition Width="*"/>
  51. <ColumnDefinition Width="auto"/>
  52. </Grid.ColumnDefinitions>
  53. <Image
  54. Width="64"
  55. Height="64"
  56. Source="{Binding ImageBitmap}" />
  57. <StackPanel
  58. Grid.Column="1"
  59. Margin="5"
  60. Orientation="Vertical">
  61. <TextBlock
  62. Text="{Binding name}"/>
  63. <TextBlock
  64. Text="{Binding Pos}"/>
  65. <TextBlock
  66. Text="{Binding Sex}"/>
  67. </StackPanel>
  68. <TextBlock
  69. Grid.Column="2"
  70. Text="{Binding Age}"/>
  71. </Grid>
  72. </Border>
  73. </DataTemplate>
  74. </ListBox.ItemTemplate>
  75. </ListBox>
  76. <StackPanel
  77. Orientation="Vertical"
  78. Grid.RowSpan="3"
  79. VerticalAlignment="Bottom">
  80. <Button
  81. x:Name="ExitButton"
  82. Content="Выход"
  83. Click="ExitButton_Click"
  84. Height="50"/>
  85. </StackPanel>
  86. <WrapPanel
  87. Orientation="Horizontal"
  88. Grid.Column="1"
  89. MinHeight="50">
  90. <Label
  91. Content="Должность:"
  92. VerticalAlignment="Center"/>
  93. <ComboBox
  94. Name="PosFilterComboBox"
  95. SelectionChanged="PosFilterComboBox_SelectionChanged_1"
  96. VerticalAlignment="Center"
  97. MinWidth="100"
  98. SelectedIndex="0"
  99. ItemsSource="{Binding WorkerPosList}">
  100. <ComboBox.ItemTemplate>
  101. <DataTemplate>
  102. <Label
  103. Content="{Binding title}"/>
  104. </DataTemplate>
  105. </ComboBox.ItemTemplate>
  106. </ComboBox>
  107. <Label
  108. Content="Возраст:"
  109. VerticalAlignment="Center"/>
  110. <ComboBox
  111. Name="AgeFilterComboBox"
  112. SelectionChanged="AgeFilterComboBox_SelectionChanged_2"
  113. VerticalAlignment="Center"
  114. MinWidth="100"
  115. SelectedIndex="0"
  116. ItemsSource="{Binding WorkerAgeList}">
  117. <ComboBox.ItemTemplate>
  118. <DataTemplate>
  119. <Label
  120. Content="{Binding title}"/>
  121. </DataTemplate>
  122. </ComboBox.ItemTemplate>
  123. </ComboBox>
  124. <Label
  125. Content="Пол"
  126. VerticalAlignment="Center"/>
  127. <ComboBox
  128. Name="SexFilterComboBox"
  129. SelectionChanged="SexFilterComboBox_SelectionChanged_3"
  130. VerticalAlignment="Center"
  131. MinWidth="100"
  132. SelectedIndex="0"
  133. ItemsSource="{Binding WorkerSexList}">
  134. <ComboBox.ItemTemplate>
  135. <DataTemplate>
  136. <Label
  137. Content="{Binding title}"/>
  138. </DataTemplate>
  139. </ComboBox.ItemTemplate>
  140. </ComboBox>
  141. <RadioButton
  142. GroupName="Price"
  143. Tag="2"
  144. Content="Старше"
  145. Checked="RadioButton_Checked"
  146. VerticalAlignment="Center" RenderTransformOrigin="0.067,0.44"/>
  147. <RadioButton
  148. GroupName="Price"
  149. Tag="1"
  150. Content="Младше"
  151. IsChecked="True"
  152. Checked="RadioButton_Checked"
  153. VerticalAlignment="Center" Height="15" Width="69"/>
  154. <Label
  155. Content="Искать"
  156. VerticalAlignment="Center"/>
  157. <TextBox
  158. Width="200"
  159. VerticalAlignment="Center"
  160. x:Name="SearchFilterTextBox"
  161. KeyUp="SearchFilter_KeyUp"/>
  162. </WrapPanel>
  163. </Grid>
  164. </Window>