<Page x:Class="DemoexamUser11.pages.AgentsList"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:DemoexamUser11.pages"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="AgentsList">
    <Page.Resources>
        <DataTemplate x:Key="listItemTemplate">
            <Border BorderBrush="Black" BorderThickness="1" Height="120">
                <StackPanel Orientation="Horizontal" >
                    <Image Source="{Binding ImagePath}" Height="120" Width="120"/>
                    <StackPanel Orientation="Vertical" Margin="5 10" Width="600">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Type}" FontSize="20" Margin="0 3" Width="70"/>
                            <TextBlock Text="|  " FontSize="20" Margin="0 3"/>
                            <TextBlock Text="{Binding Title}" FontSize="20" Margin="0 3" Width="200"/>
                            <TextBlock Text="{Binding Descount}" FontSize="25" Margin="200 0 0 0"/>
                        </StackPanel>
                        <TextBlock Text="{Binding SaleYear}" FontSize="16" Margin="0 3"/>
                        <TextBlock Text="{Binding Phone}" FontSize="16" Margin="0 3"/>
                        <TextBlock Text="{Binding PriorityText}" FontSize="16" />
                    </StackPanel>
                </StackPanel>
            </Border>
        </DataTemplate>
    </Page.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="13*"/>
            <RowDefinition Height="137*"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0">
            <TextBox x:Name="textBoxSearch" Width="250" Height="25" Margin="10 0" TextChanged="Search"/>
            <ComboBox x:Name="comboBoxSort" Width="150" Height="25" SelectionChanged="Filter"/>
            <Button x:Name="buttomBigger" Content="Изменить порядок" Height="25" Click="buttomBigger_Click"/>
            <ComboBox x:Name="comboBoxFilter" Width="100" Height="25" Margin="10 0" SelectionChanged="Filter"/>
            <Button x:Name="buttomChangePriority" Content="Изменить приоритет" Height="25" Click="buttomChangePriority_Click"/>
        </StackPanel>
        <ListBox x:Name="listBoxAgents" ItemTemplate="{StaticResource listItemTemplate}" Grid.Row="1" SelectionMode="Multiple"/>
    </Grid>
</Page>
