<mah:MetroWindow x:Class="ZKuP.CreateParkausweis"
        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="Parkausweis beantragen" Height="850" Width="360" MinWidth="360" MinHeight="850" Loaded="Window_Loaded" LocationChanged="Window_LocationChanged">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition Height="1.2*"/>
            <RowDefinition/>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="0.8*"/>
            <RowDefinition x:Name="CommentRow" Height="1*" />
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Vorname*" VerticalAlignment="Top"/>
        <TextBox x:Name="tbVorname" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>

        <TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Nachname*" VerticalAlignment="Top" Grid.Row="1"/>
        <TextBox x:Name="tbNachname" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="1" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>

        <TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="E-Mail*" VerticalAlignment="Top" Grid.Row="2"/>
        <TextBox x:Name="tbEmail" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="2" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown" PreviewLostKeyboardFocus="tbEmail_PreviewLostKeyboardFocus"/>

        <TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Telefon*" VerticalAlignment="Top" Grid.Row="3"/>
        <TextBox x:Name="tbTelefon" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="3" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown" PreviewLostKeyboardFocus="tbTelefon_PreviewLostKeyboardFocus"/>

        <TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Abteilungskürzel (zB. P.FBW-M2)*" VerticalAlignment="Top" Grid.Row="4"/>
        <TextBox x:Name="tbAbteilung" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="4" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>

        <TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Firma*" VerticalAlignment="Top" Grid.Row="5"/>
        <ComboBox x:Name="cbFirma" Margin="10,27.5,10,0" Grid.Row="5">
            <ComboBoxItem Content="DB Fernverkehr AG" IsSelected="True"/>
            <ComboBoxItem Content="DB Netz AG"/>
            <ComboBoxItem Content="DB Services GmbH"/>
            <ComboBoxItem Content="DB Gastronomie GmbH"/>
            <ComboBoxItem Content="DB Regio AG"/>
        </ComboBox>

        <TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Private Adresse (Straße und Hausnummer)*" VerticalAlignment="Top" Grid.Row="6"/>
        <TextBox x:Name="tbAdresse" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="6" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown" PreviewLostKeyboardFocus="tbAdresse_PreviewLostKeyboardFocus"/>

        <TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Postleitzahl*" VerticalAlignment="Top" Grid.Row="7"/>
        <TextBox x:Name="tbPLZ" Margin="10,26,10,0" Height="25" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="7" PreviewTextInput="tbPLZ_PreviewTextInput" TextInput="tbPLZ_TextInput" CommandManager.PreviewExecuted="tbPLZ_PreviewExecuted" TextChanged="tbPLZ_TextChanged" ContextMenu="{x:Null}"/>
        <!---->

        <TextBlock Text="Fahrzeugtyp" Grid.Row="8" Margin="10,5,10,10" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <StackPanel Orientation="Horizontal" Grid.Row="8" VerticalAlignment="Center" Margin="10,30,10,10" HorizontalAlignment="Left" Height="24" Width="292">
            <RadioButton x:Name="rbPKW" Content="PKW" HorizontalAlignment="Center" Width="100" Margin="50,0,0,0" IsChecked="True"/>
            <RadioButton x:Name="rbKrad" Content="Kraftrad" HorizontalAlignment="Left"/>
        </StackPanel>

        <TextBlock Margin="10,5,10,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="Vorgesetzter*" VerticalAlignment="Top" Grid.Row="9"/>
        <TextBox x:Name="tbVorgesetzter" Margin="10,26,10,0" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="9" TextChanged="Textboxes_Changed" PreviewKeyDown="TextBoxes_PreviewKeyDown"/>


        <StackPanel Margin="150,20,10,12" Grid.Row="10">
            <RadioButton x:Name="rbDKennzeichen" Content="Deutsches Kennzeichen" Height="25" VerticalAlignment="Bottom" IsChecked="True"/>
            <RadioButton x:Name="rbOtherKennzeichen" Content="Ausländisches Kennzeichen" Height="25" VerticalAlignment="Bottom" Checked="rbOtherKennzeichen_Checked"/>
            <RadioButton x:Name="rbVersKennzeichen" Content="Versicherungskennzeichen" Height="25" VerticalAlignment="Bottom" Checked="rbVersKennzeichen_Checked"/>
        </StackPanel>


        <TextBlock Text="Kennzeichen*" Margin="10,10,0,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" VerticalAlignment="Top" Grid.Row="10"/>
        
        <StackPanel x:Name="spDKennzeichen" Margin="10,36,0,20" Grid.Row="10" HorizontalAlignment="Left" Orientation="Horizontal" Width="130">
            <TextBox x:Name="tbDTownKennzeichen" Height="25" CharacterCasing="Upper" Padding="0,4,0,0" TextWrapping="Wrap" Visibility="Visible" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextAlignment="Center" Width="37" PreviewTextInput="tbDTownKennzeichen_PreviewTextInput" TextChanged="Textboxes_Changed"/>
            <TextBlock Margin="5,0,0,0" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TextWrapping="Wrap" Text="-" HorizontalAlignment="Left" Visibility="Visible" FontSize="14" FontWeight="SemiBold" Padding="0,2,0,0" Height="20"/>
            <TextBox x:Name="tbDCharsKennzeichen" Height="25" Margin="5,0,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" Visibility="Visible" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextAlignment="Center" Width="32" PreviewTextInput="tbDCharsKennzeichen_PreviewTextInput" TextChanged="Textboxes_Changed"/>
            <TextBox x:Name="tbDDigitsKennzeichen" Height="25" Margin="5,0,0,0" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" Visibility="Visible" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextAlignment="Center" Width="39" PreviewTextInput="tbDDigitsKennzeichen_PreviewTextInput" TextChanged="Textboxes_Changed"/>
        </StackPanel>

        <TextBox x:Name="tbOtherKennzeichen" Height="25" Margin="10,0,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" Visibility="Collapsed" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextChanged="Textboxes_Changed" Width="124"/>

        <StackPanel x:Name="spVersKennzeichen" Orientation="Horizontal" Visibility="Collapsed" Grid.Row="10" Margin="10,15,0,0">
            <TextBox x:Name="tbVersKennzeichen1" MaxLength="3" Height="25" Margin="10,0,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextChanged="Textboxes_Changed" Width="40"/>
            <TextBox x:Name="tbVersKennzeichen2" MaxLength="3" Height="25" Margin="10,0,0,0" CharacterCasing="Upper" HorizontalAlignment="Left" Padding="0,4,0,0" TextWrapping="Wrap" Grid.Row="10" PreviewKeyDown="TextBoxes_PreviewKeyDown" TextChanged="Textboxes_Changed" Width="40"/>
        </StackPanel>

        <CheckBox x:Name="cBCorrectness" Content="Hiermit bestätige ich die Richtigkeit &#xD;&#xA;und Vollständigkeit der Angaben" Grid.Row="11" HorizontalAlignment="Center" VerticalAlignment="Center" Unchecked="cBCorrectness_Unchecked" Checked="cBCorrectness_Checked"/>

        <TextBox x:Name="tbBemerkung" Margin="10" Grid.Row="12" TextWrapping="Wrap" AutomationProperties.HelpText="Bemerkung" ToolTip="Bemerkung" PreviewGotKeyboardFocus="tbBemerkung_PreviewGotKeyboardFocus" PreviewLostKeyboardFocus="tbBemerkung_PreviewLostKeyboardFocus"/>
        <TextBlock x:Name="lblBemerkung" Margin="15" Grid.Row="12" Text="Bemerkung" TextWrapping="Wrap" Foreground="Gray" IsHitTestVisible="False"/>

        <Button x:Name="btnCreate" Content="Beantragen" Margin="10" Grid.Row="13" Click="btnCreate_Click" IsEnabled="False"/>
    </Grid>
</mah:MetroWindow>
