<Window x:Class="DataTriggerTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:DataTriggerTest"
        Title="MainWindow" Height="350" Width="525">
    <Window.DataContext>
        <vm:Employees/>
    </Window.DataContext>
    <Window.Resources>
        <Style TargetType="DataGridRow">
            <Style.Triggers>
                <DataTrigger Binding="{Binding Path=IsPresent}" Value="False">
                    <Setter Property="Background" Value="#1BFC0000"/>
                    <Setter Property="Foreground" Value="Silver"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <DataGrid ItemsSource="{Binding}" AutoGenerateColumns="False" Margin="5" >
        <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" Width="40" IsReadOnly="True">
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <Image Source="{Binding Path=Picture}" />
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
            </DataGridTemplateColumn>
        </DataGrid.Columns>
    </DataGrid>
</Window>
