<Page x:Class="BuzuevaDemo.Pages.Agents"
      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:BuzuevaDemo.Pages"
      mc:Ignorable="d" 
      d:DesignHeight="450" 
      Title="Агенты" Width="918">
    <Page.Resources>
        <DataTemplate x:Key="AllAgent">
            <Border BorderThickness="1" BorderBrush="Black" Width="600">
                <StackPanel Orientation="Horizontal" MouseLeftButtonDown="PerexodCreate">
                    <Image Source="{Binding Logo}" Width="80" Height="80"/>
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding TitleType}"/>
                            <TextBlock Text =" | "/>
                            <TextBlock  Text="{Binding Title}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock/>
                            <TextBlock Text ="продаж за год" />
                        </StackPanel>
                        <TextBlock Text="{Binding Phone}"/>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text ="Приоритетность:"/>
                            <TextBlock Text="{Binding Priority}"/>
                        </StackPanel>
                    </StackPanel>
                    <TextBlock FontSize="20"/>
                </StackPanel>
            </Border>
        </DataTemplate>
    </Page.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="64"/>
            <RowDefinition Height="363*"/>
            <RowDefinition Height="23*"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Center" Background="#C6D7FF" >
            <GroupBox Header="Введите для поиска" Width="300">
                <TextBox x:Name="poisk" Height="40" TextChanged="Changeg" />
            </GroupBox>
            <ComboBox x:Name="sort" Width="200" Margin="10, 5" Height="40">
                <TextBlock>Наименование (возр.)</TextBlock>
                <TextBlock>Наименование (убыв.)</TextBlock>
                <TextBlock>Размер скидки (возр.)</TextBlock>
                <TextBlock>Размер скидки (убыв.)</TextBlock>
                <TextBlock>Приоритет агента (возр.)</TextBlock>
                <TextBlock>Приоритет агента (убыв.)</TextBlock>
            </ComboBox>
            <ComboBox x:Name="filt" Width="200" Margin="10, 5" Height="40" >
                <TextBlock>Все типы</TextBlock>
                <TextBlock>МФО</TextBlock>
                <TextBlock>ПАО</TextBlock>
                <TextBlock>ООО</TextBlock>
                <TextBlock>ЗАО</TextBlock>
                <TextBlock>ОАО</TextBlock>
                <TextBlock>MKK</TextBlock>
            </ComboBox>
        </StackPanel>
        <ListBox  Grid.Row="1" x:Name="AllAgent" ItemTemplate="{StaticResource AllAgent}" />
    </Grid>
</Page>
