<mah:MetroWindow x:Class="ZKuP.CreateVisitor_List"
        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="Besucherliste" Height="450" Width="800" Loaded="Window_Loaded" LocationChanged="Window_LocationChanged">
    <Grid>
        <Button x:Name="btnDelete" Content="Markierten Besucher löschen" FontSize="12" Padding="-2" Height="23" Margin="0,10,10,0" VerticalAlignment="Top" HorizontalAlignment="Right" Width="167" Click="btnDelete_Click" IsEnabled="False"/>

        <DataGrid x:Name="dgVisitors" ItemsSource="{Binding Path=., Mode=OneWay}" KeyboardNavigation.TabNavigation="None" Margin="10,45,10,44" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="True" HorizontalScrollBarVisibility="Visible" PreviewKeyDown="DgVisitors_PreviewKeyDown" CellEditEnding="DgVisitors_CellEditEnding" BeginningEdit="DgVisitors_BeginningEdit" SelectionChanged="dgVisitors_SelectionChanged" PreparingCellForEdit="dgVisitors_PreparingCellForEdit" ToolTip="Daten können per Doppelklick geändert werden">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Name}" ClipboardContentBinding="{x:Null}" Header="Name" Width="*" MinWidth="150" SortDirection="Ascending"/>
                <DataGridTextColumn Binding="{Binding Verantwortlicher_MA}" ClipboardContentBinding="{x:Null}" Header="Verantw. MA" MinWidth="150"/>
                <DataGridTextColumn Binding="{Binding Tel_Nr_Besucher}" ClipboardContentBinding="{x:Null}" Header="Tel. Besucher" MinWidth="150"/>
                <DataGridTextColumn Binding="{Binding Anzahl_Begleitpersonen}" ClipboardContentBinding="{x:Null}" Header="Anz. Begleitp." MinWidth="50">
                    <DataGridTextColumn.ElementStyle>
                        <Style TargetType="{x:Type TextBlock}">
                            <Setter Property="TextAlignment" Value="Center"/>
                        </Style>
                    </DataGridTextColumn.ElementStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Besuchstag, StringFormat=\{0:dd.MM.yyyy\}}" ClipboardContentBinding="{x:Null}" Header="Besuchstag" MinWidth="75">
                    <DataGridTextColumn.ElementStyle>
                        <Style TargetType="{x:Type TextBlock}">
                            <Setter Property="TextAlignment" Value="Center"/>
                        </Style>
                    </DataGridTextColumn.ElementStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Grund_des_Besuchs}" ClipboardContentBinding="{x:Null}" Header="Grund des Besuchs" MinWidth="200"/>
                <DataGridTextColumn Binding="{Binding Oertlichkeit}" ClipboardContentBinding="{x:Null}" Header="Örtlichkeit" MinWidth="150"/>
                <DataGridTextColumn Binding="{Binding Ansprechpartner_Intern}" ClipboardContentBinding="{x:Null}" Header="Anspr. intern" MinWidth="150"/>
                <DataGridTextColumn Binding="{Binding Tel_Nr_Ansprechpartner_Intern}" ClipboardContentBinding="{x:Null}" Header="Tel. Ansprechp." MinWidth="150"/>
            </DataGrid.Columns>
        </DataGrid>
        <Button x:Name="btnClose" Content="Schließen" Margin="0,0,10,10" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="98" Height="28" Click="BtnClose_Click" TabIndex="11"/>

    </Grid>
</mah:MetroWindow>
