<Page x:Class="WpfApp1.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:WpfApp1.Pages"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="AgentsList">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="160"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Height="30" Width="200" Margin="109,10,491,120">Введите для поиска</TextBlock>
        <TextBlock Grid.Row="0" Height="30" Width="100" Margin="399,10,301,120">Фильтрация</TextBlock>
        <TextBlock Grid.Row="0" Height="30" Width="100" Margin="551,10,149,120">Сортировка</TextBlock>
        <WrapPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center">
            <TextBox Name="TbSearch" Height="30" Width="250" Margin="35" BorderBrush="#46B29D" TextChanged="TbSearch_TextChanged"></TextBox>
            <ComboBox Name="CbSort" Height="30" Width="120" SelectionChanged="CbSort_SelectionChanged">
                <ComboBoxItem>Название возр.</ComboBoxItem>
                <ComboBoxItem>Название убыв.</ComboBoxItem>
                <ComboBoxItem>Скидка возр.</ComboBoxItem>
                <ComboBoxItem>Скидка убыв.</ComboBoxItem>
                <ComboBoxItem>Приоритет возр.</ComboBoxItem>
                <ComboBoxItem>Приоритет убыв.</ComboBoxItem>
            </ComboBox>
            <ComboBox x:Name="CbFilt" Height="30" Width="120" Margin="35" SelectionChanged="CbFilt_SelectionChanged"/>
        </WrapPanel>
        <ListView Grid.Row="1" Name="Agents" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <Border Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="#46B29D">
                        <Grid Width="600" Height="100">
                            <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
                                <Image Source="{Binding image}" HorizontalAlignment="Left" Height="70" Width="100"/>
                                <StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{Binding AgentType.Title}"></TextBlock>
                                        <TextBlock>|</TextBlock>
                                        <TextBlock Text="{Binding Title}"></TextBlock>
                                    </StackPanel>
                                    <TextBlock></TextBlock>
                                    <TextBlock Text="{Binding Phone}"></TextBlock>
                                    <TextBlock Text="{Binding Priority, StringFormat={} Приоритетность: {0}}"></TextBlock>
                                </StackPanel>
                            </StackPanel>
                        </Grid>
                    </Border>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </Grid>
</Page>
