<Window x:Class="ListView.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:ListView"
        Title="ListView" Height="350" Width="525">
    <Window.DataContext>
        <vm:Employees/>
    </Window.DataContext>
    <Window.Resources>
        <DataTemplate x:Key="cellTemplateIsPres">
            <StackPanel >
                <CheckBox IsChecked="{Binding Path=IsPresent}"/>
            </StackPanel>
        </DataTemplate>
    </Window.Resources>
    <ListView ItemsSource="{Binding}" Margin="5,45,5,5">
        <ListView.View>
            <GridView AllowsColumnReorder="true"
              ColumnHeaderToolTip="Informacja o pracownikach">
                <GridViewColumn Header="Imię" DisplayMemberBinding="{Binding Path=Name}" />
                <GridViewColumn Header="Nazwisko"
					DisplayMemberBinding="{Binding Path=Surname}" />
                <GridViewColumn Header="Stanowisko" DisplayMemberBinding="{Binding Path=Position}" />
                <GridViewColumn Header="Email" DisplayMemberBinding="{Binding Path=Email}"/>
                <GridViewColumn Header="Obecny" CellTemplate="{StaticResource cellTemplateIsPres}" />
            </GridView>
        </ListView.View>
    </ListView>
</Window>
