<Window x:Class="WpfApp1.Windows.EmploeeWindow"
        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>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <WrapPanel Orientation="Horizontal" Margin="5" >
            <Button Content="Редактировать" Name="EditBtn" Click="EditBtn_Click"/>
            <Button Content="Регистрация" Name="RegistrationBtn" Click="RegistrationBtn_Click"/>
        </WrapPanel>
        <ListView Grid.Row="1" x:Name="emploeeList" HorizontalContentAlignment="Stretch">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <Border BorderThickness="1" BorderBrush="Black">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>

                            <TextBlock Text="{Binding Position.Title, StringFormat=Должнсть: {0}}"/>

                            <TextBlock Grid.Row="1">
                                <TextBlock.Text>
                                    <MultiBinding StringFormat="{}{0} {1} {2}">
                                        <Binding Path="Surname"/>
                                        <Binding Path="Name"/>
                                        <Binding Path="Middlename"/>
                                    </MultiBinding>
                                </TextBlock.Text>
                            </TextBlock>

                            <TextBlock Grid.Column="1" Text="{Binding WorkStatus.Title}"/>

                            <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Login, StringFormat=Логин: {0}}"/>
                        </Grid>
                        
                    </Border>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

    </Grid>
</Window>
