<Window x:Class="DataGrid.DataGridDetails"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       xmlns:vm="clr-namespace:DataGrid"
        Title="DataGrid" Height="300" Width="541">
    <Window.DataContext>
        <vm:Employees/>
    </Window.DataContext>
    <DataGrid  AlternatingRowBackground="LightGray"  AlternationCount="2"  AutoGenerateColumns="False" ItemsSource="{Binding}"  Margin="5,45,5,5" GridLinesVisibility="None">
        <DataGrid.Columns>
            <DataGridTextColumn Header="Imię" Binding="{Binding Path=Name}" />
            <DataGridTextColumn Header="Nazwisko" Binding="{Binding Path=Surname}" />
            <DataGridTextColumn Header="Stanowisko" Binding="{Binding Path=Position}" />
            <DataGridTextColumn Header="E-mail" Binding="{Binding Path=Email}" />
            <DataGridCheckBoxColumn Header="Obecny" IsReadOnly="True" Binding="{Binding Path=IsPresent}" />
            <DataGridTemplateColumn Header="Zdjęcie" MaxWidth="40" IsReadOnly="True">
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <Image Source="{Binding Path=Picture}" />
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
            </DataGridTemplateColumn>
        </DataGrid.Columns>
        <DataGrid.RowDetailsTemplate>
            <!--dodatkowe informacje pod rekordem - np. wizytówka-->
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Margin="10" FontWeight="Bold" Foreground="Gray" Text="{Binding Path=Name}"/>
                    <TextBlock Margin="10" FontWeight="Bold" Foreground="Gray" Text="{Binding Path=Surname}"/>
                    <TextBlock Margin="10" FontWeight="Bold" Foreground="#FF2BB182" Text="Telefon: brak informacji w bazie"/>
                </StackPanel>
            </DataTemplate>
        </DataGrid.RowDetailsTemplate>
    </DataGrid>
</Window>
