<mah:MetroWindow x:Name="metroWindow" BorderThickness="1" BorderBrush="Red"
        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:local="clr-namespace:ZKuP"
        xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" x:Class="ZKuP.Arrivals"
        mc:Ignorable="d"
        WindowStartupLocation="CenterOwner"
        Title="Ankunft bestätigen" MinHeight="650" MinWidth="800" Width="{Binding MinWidth, ElementName=metroWindow}" Height="{Binding MinHeight, ElementName=metroWindow}"
                 ResizeMode="NoResize" PreviewGotKeyboardFocus="Window_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="Window_PreviewLostKeyboardFocus" 
                 mah:UseNoneWindowStyle="True" AllowsTransparency="True" Loaded="Window_Loaded">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="480"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="260"/>
        </Grid.RowDefinitions>
        <Grid x:Name="WindowBar" VerticalAlignment="Top" Grid.ColumnSpan="2" Background="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" Height="30" PreviewMouseDown="Window_PreviewMouseDown">
            <TextBlock Text="Ankunft bestätigen" Margin="10,5,0,0" HorizontalAlignment="Left" Padding="0" Foreground="White"/>
        </Grid>
        <Button x:Name="btnClose_Copy" Content="✕" Grid.Column="1" Padding="0,0,0,0" Margin="0,6,6,0" Height="18" BorderBrush="{x:Null}" Background="PaleVioletRed" Click="CloseWithX_Click" VerticalAlignment="Top" TabIndex="6" IsEnabled="True" HorizontalAlignment="Right" Width="20"/>

        <Grid x:Name="spinnerCanvas" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="0,30,0,0" Background="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" Panel.ZIndex="99" Visibility="Visible">
            <local:ucSpinnerPiston Canvas.Left="74" Canvas.Top="230" RenderTransformOrigin="0.5,0.5" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="25" Height="27" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0">
                <local:ucSpinnerPiston.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="3" ScaleY="3"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </local:ucSpinnerPiston.RenderTransform>
            </local:ucSpinnerPiston>
        </Grid>

        <Grid x:Name="gridLeft" Margin="0,30,0,0" Grid.Column="0" HorizontalAlignment="Left">
            <Grid.RowDefinitions>
                <RowDefinition Height="200"/>
                <RowDefinition x:Name="kennzeichenRow" Height="40"/>
                <RowDefinition Height="95"/>
                <!--<RowDefinition x:Name="GParkRow" Height="0*"/>
                <RowDefinition Height="220"/>
                <RowDefinition Height="30"/>-->
                <!--x:Name="GParkTop" Height="280"-->
            </Grid.RowDefinitions>

            <Grid x:Name="gridArrival" Grid.Row="0">
                <ComboBox x:Name="cbName" Grid.Row="0" Margin="45,38,46,0" VerticalAlignment="Top" Padding="15,2,0,0" HorizontalContentAlignment="Center" TabIndex="7" DisplayMemberPath="Value" SelectedValuePath="Key" SelectionChanged="CbName_SelectionChanged"/>
                <TextBlock HorizontalAlignment="Left" Grid.Row="0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Height="23" Margin="30,15,0,0" TextWrapping="Wrap" Text="Firma/Besucher:" VerticalAlignment="Top" Width="120"/>

                <ComboBox x:Name="tbVerantwortlPerson" IsEditable="True" Grid.Row="0" Height="23" Margin="45,83,46,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" Padding="15,2,0,0" TabIndex="1" mah:TextBoxHelper.Watermark="Verantwortliche Person"/>
                <!--<TextBlock Margin="45,86,46,0" Grid.Row="0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0" Text="Verantwortlicher MA" IsHitTestVisible="False"/>-->


                <TextBlock x:Name="tbMultiplePeople" Text="↪" Visibility="Collapsed" Foreground="Red" FontSize="20" HorizontalAlignment="Right" Margin="0,0,20,90" ToolTip="Mehrere Personen stehen zur Auswahl" ToolTipService.InitialShowDelay="100">
                    <TextBlock.LayoutTransform>
                        <RotateTransform Angle="180"/>
                    </TextBlock.LayoutTransform>
                </TextBlock>

                <ComboBox x:Name="tbNrVerantwortlPerson" IsEditable="True" Grid.Row="0" Height="23" Margin="45,108,46,0" VerticalAlignment="Top" HorizontalContentAlignment="Center" Padding="15,2,0,0" TabIndex="2" mah:TextBoxHelper.Watermark="Telefonnummer"/>
                <!--<TextBlock Margin="45,111,311,0" Grid.Row="0" TextWrapping="Wrap" Text="Tel. Nr. des MA" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0" IsHitTestVisible="False"/>-->

                <TextBox x:Name="tbAnzahlPersonen" Height="23" Grid.Row="0" Margin="45,142,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="3" PreviewTextInput="tbAnzahlPersonen_PreviewTextInput"/>
                <TextBox x:Name="tbAnzahlFzg" Height="23" Grid.Row="0" Margin="45,167,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="4" PreviewTextInput="tbAnzahlFzg_PreviewTextInput"/>
                <TextBlock Margin="45,145,311,0" Grid.Row="0" TextWrapping="Wrap" Text="Anzahl Personen" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"/>
                <TextBlock Margin="45,171,311,0" Grid.Row="0" TextWrapping="Wrap" Text="Anzahl Fahrzeuge" VerticalAlignment="Top" Foreground="Gray" Padding="5,0,0,0"/>
                <TextBlock x:Name="lblAngemeldeteBesucher" Grid.Row="0" Margin="290,145,46,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#CCFF0000" Padding="0,0,5,0" TextAlignment="Right"/>
                <TextBlock x:Name="lblAngemeldeteFzg" Grid.Row="0" Margin="290,171,46,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#CCFF0000" Padding="0,0,5,0" TextAlignment="Right"/>
            </Grid>

            <!--<TextBox x:Name="tbKennzeichen" Height="23" Margin="45,130,46,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center" Padding="0,2,0,0" TabIndex="3"/>-->
            <StackPanel x:Name="spKennzeichen" Margin="45,0" Grid.Row="1"/>


            <StackPanel Grid.Row="2" Margin="0,10,0,0">
                <TextBlock Text="Bemerkung:" Margin="30,0" TextWrapping="Wrap" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Padding="0" Height="22"/>
                <TextBox x:Name="tbBemerkung" Height="60" Margin="45,0" TextWrapping="Wrap" Padding="0,2,0,0" TabIndex="4" VerticalScrollBarVisibility="Auto" AcceptsReturn="True"/>
            </StackPanel>


        </Grid>


        <Grid x:Name="gridRight" Grid.Column="1" Margin="0,45,30,0" HorizontalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition Height="40*"/>
                <RowDefinition Height="40*"/>
                <RowDefinition Height="40*"/>
                <RowDefinition Height="40*"/>
                <RowDefinition Height="125*"/>
                <RowDefinition Height="50*"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
                <TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Anmeldung:" Width="190"/>
                <Label x:Name="lblAnmeldung" Height="30" Margin="0, 5" Foreground="Black" HorizontalContentAlignment="Center" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1"/>
            </StackPanel>

            <StackPanel Grid.Row="1">
                <TextBlock Grid.Row="4" HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Einweisung:" Width="190"/>
                <Label x:Name="lblEinweisung" Grid.Row="4" Margin="0, 5" Height="30" Foreground="Black" HorizontalContentAlignment="Center" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1" />
            </StackPanel>

            <StackPanel Grid.Row="2">
                <TextBlock HorizontalAlignment="Left" Grid.Row="5" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap"><Run Text="Kleine Unterweisung:"/></TextBlock>
                <Label x:Name="lblKleineUnterweisung" Grid.Row="5" Margin="0, 5" Foreground="Black" HorizontalContentAlignment="Center" VerticalAlignment="Top" Height="30" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1" />
            </StackPanel>

            <StackPanel Grid.Row="3">
                <TextBlock HorizontalAlignment="Left" Grid.Row="6" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Fahrzeuge:" Width="190"/>
                <Label x:Name="lblFahrzeuge" Grid.Row="6" Height="30" Margin="0, 5" Foreground="Black" HorizontalContentAlignment="Center" Background="#33808080" BorderBrush="#99000000" BorderThickness="1" Padding="1"/>
            </StackPanel>


            <Grid x:Name="gridBesucherPark" Visibility="Collapsed" Grid.Row="4" Margin="0, 30, 0, 0">
                <TextBlock HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Gästeparkplatz zuweisen:" VerticalAlignment="Top" Width="170"/>
                <Grid x:Name="BesuchP" Margin="0, 25, 0, 0" HorizontalAlignment="Center" VerticalAlignment="Top">
                    <Rectangle x:Name="G1" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 0, 0, 0" StrokeThickness="1" Fill="Green"/>
                    <TextBlock Text="1" Margin="0, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
                    <Rectangle x:Name="G2" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="50, 0, 0, 0" StrokeThickness="1" Fill="Green"/>
                    <TextBlock Text="2" Margin="50, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
                    <Rectangle x:Name="G3" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100, 0, 0, 0" StrokeThickness="1" Fill="Green"/>
                    <TextBlock Text="3" Margin="100, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
                    <Rectangle x:Name="G4" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="150, 00, 0, 0" StrokeThickness="1" Fill="Green"/>
                    <TextBlock Text="4" Margin="150, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
                    <Rectangle x:Name="G5" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="200, 0, 0, 0" StrokeThickness="1" Fill="Green"/>
                    <TextBlock Text="5" Margin="200, 0, 0, 0" Width="40" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="G_ParkPreviewMouseLeftButtonDown"/>
                </Grid>

                <Border x:Name="borderParkkarteAusgeben" Visibility="Collapsed" BorderThickness="2" BorderBrush="Red" Height="40" VerticalAlignment="Bottom" Margin="0,0" CornerRadius="10">
                    <TextBlock x:Name="lblParkkarteAusgeben" Text="" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                </Border>
            </Grid>

            <Grid x:Name="gridFirmenPark" Visibility="Collapsed" Grid.Row="4" HorizontalAlignment="Center" Margin="0, 30, 0, 0" VerticalAlignment="Top" ToolTip="Rote Parkplätze sind belegt, Grüne frei">
                <TextBlock Text="Parkplätze im Werk:" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Margin="0, -20, 0, 0" Height="20" Width="150" HorizontalAlignment="Left" VerticalAlignment="Top"/>

                <Rectangle x:Name="P1" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 0, 0, 0" StrokeThickness="0" Fill="Green" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown"/>
                <TextBlock Text="1" Margin="0, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>

                <Rectangle x:Name="P2" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 20, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="2" Margin="0, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P3" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 40, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="3" Margin="0, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P4" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 60, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="4" Margin="0, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="10" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>

                <Rectangle x:Name="P5" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25, 0, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="5" Margin="25, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P6" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25, 20, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="6" Margin="25, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P7" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25, 40, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="7" Margin="25, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="1" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P8" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25, 60, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="8" Margin="25, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="1" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>

                <Rectangle x:Name="P9" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="50, 0, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="9" Margin="50, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P10" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="50, 20, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="10" Margin="50, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P11" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="50, 40, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="11" Margin="50, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P12" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="50, 60, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="12" Margin="50, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>

                <Rectangle x:Name="P13" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="75, 0, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="13" Margin="75, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P14" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="75, 20, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="14" Margin="75, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P15" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="75, 40, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="15" Margin="75, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P16" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="75, 60, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="16" Margin="75, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>

                <Rectangle x:Name="P17" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100, 0, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="17" Margin="100, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P18" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100, 20, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="18" Margin="100, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P19" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100, 40, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="19" Margin="100, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P20" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100, 60, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="20" Margin="100, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="4" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>

                <Rectangle x:Name="P21" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="125, 0, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="21" Margin="125, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="4" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P22" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="125, 20, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="22" Margin="125, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="4" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P23" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="125, 40, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="23" Margin="125, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" Tag="2" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P24" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="125, 60, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="24" Margin="125, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>

                <Rectangle x:Name="P25" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="150, 0, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="25" Margin="150, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P26" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="150, 20, 0, 0" StrokeThickness="0" Fill="Green"/>
                <TextBlock Text="26" Margin="150, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P27" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="150, 40, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="27" Margin="150, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P28" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="150, 60, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="28" Margin="150, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P29" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="175, 0, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="29" Margin="175, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P30" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="175, 20, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="30" Margin="175, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P31" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="175, 40, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="31" Margin="175, 40, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P32" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="175, 60, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="32" Margin="175, 60, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>

                <Rectangle x:Name="P33" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="200, 0, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="33" Margin="200, 0, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>
                <Rectangle x:Name="P34" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="200, 20, 0, 0" StrokeThickness="0" Fill="Green" Stroke="Aqua"/>
                <TextBlock Text="34" Margin="200, 20, 0, 0" Width="20" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" Padding="0" FontWeight="SemiBold" PreviewMouseLeftButtonDown="ParkSetPreviewMouseLeftButtonDown" ToolTip="Klicken um Parkplatz zu belegen/freizugeben"/>

                <TextBlock x:Name="lblSelectAParkplatz" Visibility="Visible" Foreground="Red" Text="Parkplatz zuweisen!" FontWeight="Bold" FontSize="14" Margin="0, 85, 0, 0" VerticalAlignment="Top" HorizontalAlignment="Center"/>

            </Grid>

        </Grid>


        <Grid Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Bottom" Margin="20,0,20,15">
            <Border x:Name="borderParkkarteFirmaAusgeben" Visibility="Collapsed" Height="40" BorderThickness="2" BorderBrush="Red" VerticalAlignment="Top" Margin="0,25,0,0" CornerRadius="10">
                <TextBlock x:Name="lblParkkarteFirmaAusgeben" Text="" TextAlignment="Center" Width="320" TextWrapping="Wrap" HorizontalAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            </Border>
        </Grid>



        <Grid x:Name="gridButtons" Grid.Row="2" Grid.ColumnSpan="2" Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition Height="100"/>
                <RowDefinition Height="25"/>
                <RowDefinition Height="27"/>
                <RowDefinition Height="60"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
                <TextBlock Text="Ankunft bestätigen:" HorizontalAlignment="Left" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Width="170"/>
                <Button x:Name="btnCheck" HorizontalContentAlignment="Center" Padding="0" VerticalAlignment="Top" Height="70" Click="BtnCheck_Click" TabIndex="5" IsEnabled="False">
                    <Button.Background>
                        <LinearGradientBrush EndPoint="190,80" StartPoint="190,0" MappingMode="Absolute">
                            <GradientStop Color="#FFA2FF00" Offset="1"/>
                            <GradientStop Color="#FF00C300"/>
                        </LinearGradientBrush>
                    </Button.Background>
                    <Button.BorderThickness>
                        <Thickness Bottom="5" Left="5" Right="5" Top="5" />
                    </Button.BorderThickness>
                    <Button.BorderBrush>
                        <LinearGradientBrush EndPoint="190,80" StartPoint="190,0" MappingMode="Absolute">
                            <GradientStop Color="#FFB08000" Offset="1"/>
                            <GradientStop Color="#FFCB0000"/>
                        </LinearGradientBrush>
                    </Button.BorderBrush>
                    <TextBlock TextAlignment="Center" IsHitTestVisible="False" FontWeight="Bold"><Run Text="Ankunft jetzt"/><LineBreak/><Run Text="↓↓"/><LineBreak/><Run Text="Einweisung und Anmeldung"/><LineBreak/><Run Text="werden überprüft"/></TextBlock>
                </Button>
            </StackPanel>



            <Button x:Name="btnSignature" Grid.Row="1" Padding="-2" Content="Unterschrift für Einfahrt" Height="25" Click="btnSignature_Click" ToolTipService.ShowOnDisabled="True" IsEnabled="True"/>
            <Button x:Name="btnKlEinweisung_durchgeführt" Grid.Row="2" Padding="-2" Content="Hier bestätigen wenn die kleine Einweisung durchgeführt wurde" IsEnabled="False" Click="btnKlEinweisung_durchgeführt_Click" Height="25"/>
            <Button x:Name="btnKarte" Content="Karte(n) ausgeben" Grid.Row="3" Padding="-5" Height="60" Click="btnKarte_Click" IsEnabled="False"/>
        </Grid>


        <Button x:Name="btnClose" Content="Schließen" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Margin="0,0,1,1" Height="28" BorderBrush="{x:Null}" Click="Close_Click" VerticalAlignment="Bottom" TabIndex="6" IsEnabled="False"/>









        <local:PopupNonTopmost x:Name="popBE" Topmost="False" IsOpen="False" AllowsTransparency="True" Placement="Right" HorizontalOffset="20" VerticalOffset="200">
            <Grid>
                <Image x:Name="imgBE"  Source="{Binding BE}" Stretch="Uniform"/> <!--MaxWidth="600" MaxHeight="400"-->
                <StackPanel Margin="5">
                    <TextBlock Text="Gebuchte BE-Fläche der Firma:" FontSize="16" Foreground="Black" Background="White" Width="230" Padding="5,0" Height="22" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                    <TextBlock x:Name="lblParkNumbers" Text="Nur diese Parkplätze vergeben!" FontSize="16" Foreground="Red" Background="White" Padding="5,0" Height="22" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                    <TextBlock Text="Diese Parkplätze sind bereits für die Firma blockiert (rot)" FontSize="16" Foreground="Black" Background="White" Width="405" Padding="5,0" Height="22" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                </StackPanel>

                <Button x:Name="btnCloseBE" Background="Salmon" Content="✕" BorderThickness="2" BorderBrush="Black" Padding="0,-2,0,0" Width="30" Height="30" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,20,20,0" Click="btnCloseBE_Click"/>
            </Grid>
        </local:PopupNonTopmost>
        <local:PopupNonTopmost x:Name="popBesucher" Topmost="False" IsOpen="False" Width="400" AllowsTransparency="True" Placement="Right" HorizontalOffset="20" VerticalOffset="200">
            <!--PlacementTarget="{Binding DataContext, ElementName=popBE}"-->
            <Border BorderThickness="1" BorderBrush="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}">
                <Grid Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
                    <TextBlock Text="Angemeldete Personen:" FontSize="16" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" Width="180" Height="30" Margin="10,15,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                    <Button x:Name="btnClosePopBesucher" Background="Salmon" Content="✕" BorderThickness="2" BorderBrush="Black" Padding="0,-2,0,0" Width="30" Height="30" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Click="btnClosePopBesucher_Click"/>

                    <StackPanel x:Name="spBesucher" Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="15,50,0,0"/>
                </Grid>
            </Border>
        </local:PopupNonTopmost>
    </Grid>
</mah:MetroWindow>
