<mah:MetroWindow x:Class="ZKuP.ManageParkausweis"
        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:mah="http://metro.mahapps.com/winfx/xaml/controls"
        xmlns:local="clr-namespace:ZKuP"
        mc:Ignorable="d"
        Title="Parkausweise verwalten" Height="450" Width="1300" Loaded="Window_Loaded" LocationChanged="Window_LocationChanged">
    <Grid>
        <DataGrid x:Name="dgManage" PreviewKeyDown="DgManage_PreviewKeyDown" ItemsSource="{Binding .}" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" RowHeaderWidth="0" AutoGenerateColumns="False" CanUserDeleteRows="False" CanUserAddRows="False" CanUserReorderColumns="False">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding idparkausweise}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="ID" IsReadOnly="True" Width="35"/>
                <DataGridTextColumn Binding="{Binding MA_Vorname}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Vorname" IsReadOnly="True" Width="120"/>
                <DataGridTextColumn Binding="{Binding MA_Name}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Nachname" IsReadOnly="True" Width="120"/>
                <DataGridTextColumn Binding="{Binding Abteilung}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Abteilung" IsReadOnly="True" Width="85"/>
                <DataGridTextColumn Binding="{Binding Firma}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Firma" IsReadOnly="True" Width="90"/>
                <DataGridTextColumn Binding="{Binding Adresse}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Adresse" IsReadOnly="True" Width="140"/>
                <DataGridTextColumn Binding="{Binding PLZ}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="PLZ" IsReadOnly="True" Width="70">
                    <DataGridTextColumn.CellStyle>
                        <Style>
                            <Setter Property="TextBlock.TextAlignment" Value="Center"/>
                            <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Kennzeichen}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Kennzeichen" IsReadOnly="True" Width="105">
                    <DataGridTextColumn.CellStyle>
                        <Style>
                            <Setter Property="TextBlock.TextAlignment" Value="Center"/>
                            <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Email}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="E-Mail" IsReadOnly="True" Width="220"/>
                <DataGridTextColumn Binding="{Binding Telefon}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Telefon" IsReadOnly="True" Width="120"/>
                <DataGridTextColumn Binding="{Binding Vorgesetzter}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Vorgesetzter" IsReadOnly="True" Width="110"/>
                <DataGridCheckBoxColumn Binding="{Binding AcceptedCorrectness}" ClipboardContentBinding="{x:Null}" Header="Bestätigung" IsReadOnly="True" Width="100"/>
                <DataGridCheckBoxColumn Binding="{Binding Genehmigt}" ClipboardContentBinding="{x:Null}" Header="Genehmigt" IsReadOnly="False" Width="90">
                    <DataGridCheckBoxColumn.CellStyle>
                        <Style>
                            <EventSetter Event="CheckBox.PreviewMouseLeftButtonDown" Handler="OnChecked"/>
                        </Style>
                    </DataGridCheckBoxColumn.CellStyle>
                </DataGridCheckBoxColumn>
                <DataGridCheckBoxColumn Binding="{Binding Gedruckt}" ClipboardContentBinding="{x:Null}" Header="Gedruckt" IsReadOnly="False" Width="85">
                    <DataGridCheckBoxColumn.CellStyle>
                        <Style>
                            <EventSetter Event="CheckBox.PreviewMouseLeftButtonDown" Handler="OnChecked"/>
                        </Style>
                    </DataGridCheckBoxColumn.CellStyle>
                </DataGridCheckBoxColumn>
                <DataGridCheckBoxColumn Binding="{Binding Schicht}" ClipboardContentBinding="{x:Null}" Header="Schicht" IsReadOnly="False" MaxWidth="0">
                    <DataGridCheckBoxColumn.CellStyle>
                        <Style>
                            <EventSetter Event="CheckBox.PreviewMouseLeftButtonDown" Handler="OnChecked"/>
                        </Style>
                    </DataGridCheckBoxColumn.CellStyle>
                </DataGridCheckBoxColumn>
                <DataGridCheckBoxColumn Binding="{Binding isKrad}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Ist Krad?" IsReadOnly="True" Width="80"/>
                <DataGridTextColumn Binding="{Binding Bemerkung}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Bemerkung" IsReadOnly="True" Width="124"/>
            </DataGrid.Columns>
        </DataGrid>
        <TextBox x:Name="searchBox" Width="150" Height="25" mah:TextBoxHelper.Watermark="Suchen..." VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,-28,200,0" TextChanged="TextBox_TextChanged"/>
    </Grid>
</mah:MetroWindow>
