<Window x:Class="WpfApp1.Windows.OrderWindow"
        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.Windows"
        mc:Ignorable="d"
        Title="Заказы" Height="450" Width="800">
    <Grid>
        <ListView x:Name="orderList" HorizontalContentAlignment="Stretch">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <Border BorderThickness="1" BorderBrush="Black">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>

                            <TextBlock Text="{Binding ID, StringFormat=Заказ №{0}}"/>

                            <StackPanel Orientation="Horizontal" Grid.Column="1">
                                <TextBlock Text="Блюда:"/>
                                <ItemsControl ItemsSource="{Binding DishOrder}">
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding Dish.Title}"/>
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                            </StackPanel>

                            <TextBlock Grid.Column="2">
                                <TextBlock.Text>
                                    <MultiBinding StringFormat="Столик #{0} Количество клиентов: {1}">
                                        <Binding Path="TableNumber"/>
                                        <Binding Path="ClientCount"/>
                                    </MultiBinding>
                                </TextBlock.Text>
                            </TextBlock>

                            <TextBlock Text="{Binding Price, StringFormat=Стоимость заказа: {0}}" Grid.Row="1" Grid.Column="2"/>

                            <TextBlock Grid.Row="1" Text="{Binding Emploee.EmploeeName, StringFormat=Офицант: {0}}"/>

                            <TextBlock Grid.Row="1" Grid.Column="1">
                                <TextBlock.Text>
                                    <MultiBinding StringFormat="Статус заказа: {0}, {1}">
                                        <Binding Path="PayStatus.Title"/>
                                        <Binding Path="CookStatus.Title"/>
                                    </MultiBinding>
                                </TextBlock.Text>
                            </TextBlock>
                        </Grid>
                    </Border>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </Grid>
</Window>
