MainWindow.xaml 6.1 KB

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