123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- <Window x:Class="WpfApp1.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:WpfApp1"
- mc:Ignorable="d"
- Title="MainWindow" Height="450" Width="800">
- <Window.Resources>
- <Style x:Key="ButtonParentStyle">
- <Setter Property="Button.FontFamily" Value="Andy" />
- </Style>
- <Style
- x:Key="ButtonChildStyle"
- BasedOn="{StaticResource ButtonParentStyle}">
- <Setter
- Property="Button.BorderBrush"
- Value="Brown" />
- <Setter
- Property="Button.FontFamily"
- Value="Verdana" />
- </Style>
- </Window.Resources>
- <Window.Background>
- <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
- <GradientStop Color="DarkOliveGreen" Offset="0"/>
- <GradientStop Color="Lime" Offset="0.5"/>
- </LinearGradientBrush>
- </Window.Background>
-
- <Grid ShowGridLines="True">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition />
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Image
- Source ="1.jpeg"
- Grid.RowSpan="2" HorizontalAlignment="Right"/>
- <ListBox
- Grid.Column="1"
- Grid.Row="1"
- Background="White"
- ItemsSource="{Binding WorkerList}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
-
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel
- HorizontalAlignment="Center" />
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border
- BorderThickness="1"
- BorderBrush="Black"
- CornerRadius="5">
- <Grid
- Width="200"
- Margin="10"
- HorizontalAlignment="Stretch">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="64"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="auto"/>
- </Grid.ColumnDefinitions>
- <Image
- Width="64"
- Height="64"
- Source="{Binding ImageBitmap}" />
- <StackPanel
- Grid.Column="1"
- Margin="5"
- Orientation="Vertical">
- <TextBlock
- Text="{Binding name}"/>
- <TextBlock
- Text="{Binding Pos}"/>
- <TextBlock
- Text="{Binding Sex}"/>
- </StackPanel>
- <TextBlock
- Grid.Column="2"
- Text="{Binding Age}"/>
- </Grid>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <StackPanel
- Orientation="Vertical"
- Grid.RowSpan="3"
- VerticalAlignment="Bottom">
- <Button
- x:Name="ExitButton"
- Content="Выход"
- Click="ExitButton_Click"
- Height="50"/>
- </StackPanel>
- <StackPanel
- x:Name="buttonsStack"
- Background="Orange" >
- <Button
- x:Name="button1"
- Content="Кнопка 1" />
- <Button
- x:Name="button2"
- Content="Кнопка 2" Click="button2_Click" />
- </StackPanel>
- <WrapPanel
- Orientation="Horizontal"
- Grid.Column="1"
- MinHeight="50">
- <Label
- Content="Должность:"
- VerticalAlignment="Center"/>
- <ComboBox
- Name="PosFilterComboBox"
- SelectionChanged="PosFilterComboBox_SelectionChanged_1"
- VerticalAlignment="Center"
- MinWidth="100"
- SelectedIndex="0"
- ItemsSource="{Binding WorkerPosList}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <Label
- Content="{Binding title}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Label
- Content="Возраст:"
- VerticalAlignment="Center"/>
- <ComboBox
- Name="AgeFilterComboBox"
- SelectionChanged="AgeFilterComboBox_SelectionChanged_2"
- VerticalAlignment="Center"
- MinWidth="100"
- SelectedIndex="0"
- ItemsSource="{Binding WorkerAgeList}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <Label
- Content="{Binding title}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Label
- Content="Пол"
- VerticalAlignment="Center"/>
- <ComboBox
- Name="SexFilterComboBox"
- SelectionChanged="SexFilterComboBox_SelectionChanged_3"
- VerticalAlignment="Center"
- MinWidth="100"
- SelectedIndex="0"
- ItemsSource="{Binding WorkerSexList}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <Label
- Content="{Binding title}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <RadioButton
- GroupName="Price"
- Tag="2"
- Content="Старше"
- Checked="RadioButton_Checked"
- VerticalAlignment="Center" RenderTransformOrigin="0.067,0.44"/>
- <RadioButton
- GroupName="Price"
- Tag="1"
- Content="Младше"
- IsChecked="True"
- Checked="RadioButton_Checked"
- VerticalAlignment="Center" Height="15" Width="69"/>
- <Label
- Content="Искать"
- VerticalAlignment="Center"/>
- <TextBox
- Width="200"
- VerticalAlignment="Center"
- x:Name="SearchFilterTextBox"
- KeyUp="SearchFilter_KeyUp"/>
- </WrapPanel>
- </Grid>
- </Window>
|