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

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="90"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
            <TextBox Width="300" Height="25" Name="TbSearch"></TextBox>
            <ComboBox Name="CbSort" Width="100" Height="25" Margin="20,0"></ComboBox>
            <ComboBox Name="CbFilter" Width="100" Height="25"></ComboBox>
        </StackPanel>
        <ListView Name="LVAgents" Grid.Row="1">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="{Binding Logo}" Width="100" Margin="10,0"/>
                        <StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding AgentType.Title}"></TextBlock>
                                <TextBlock Margin="7,0">|</TextBlock>
                                <TextBlock Text="{Binding Title}"></TextBlock>
                            </StackPanel>
                            <TextBlock Name="TbSalesCount" Uid="{Binding ID}" Loaded="TbSalesCount_Loaded"></TextBlock>
                            <TextBlock Text="{Binding Phone}"></TextBlock>
                            <TextBlock Text="{Binding Priority, StringFormat={}Приоритетность: {0}}"></TextBlock>
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </Grid>
</Page>
