<wpf:ThemableWindow x:Class="InABox.DynamicGrid.DynamicImportForm"
        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:InABox.DynamicGrid"
        xmlns:wpf="clr-namespace:InABox.Wpf"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
        xmlns:globalization="clr-namespace:System.Globalization;assembly=mscorlib"
        mc:Ignorable="d"
        Title="Edit Import Definition" Height="800" Width="800" WindowStartupLocation="CenterScreen">
    <DockPanel Margin="5">

        <DockPanel DockPanel.Dock="Top" Margin="0,0,0,5">
            <Label Content="Name" DockPanel.Dock="Left" VerticalContentAlignment="Center" Width="80" />
            <TextBox x:Name="Name" DockPanel.Dock="Left" Margin="5,0,0,0" TextChanged="Name_TextChanged"
                     VerticalContentAlignment="Center" />
        </DockPanel>

        <DockPanel DockPanel.Dock="Top" Margin="0,0,0,5">
            <Label Content="Type" DockPanel.Dock="Left" VerticalContentAlignment="Center" Width="80" />
            <ComboBox x:Name="Type" DockPanel.Dock="Left" Width="200" DisplayMemberPath="Description"
                      SelectedValuePath="{Binding}" SelectionChanged="Type_SelectionChanged"
                      VerticalContentAlignment="Center" Margin="5,0,5,0" />
            <Button x:Name="TypeSettings"
                    Content="Settings"
                    IsEnabled="False"
                    Click="TypeSettings_Click"
                    DockPanel.Dock="Right" Padding="10,0,10,0" Margin="5,0,0,0"/>
            <Label Content=" " DockPanel.Dock="Left" />
        </DockPanel>

        <DockPanel DockPanel.Dock="Top" Margin="0,0,0,5">
            <Label Content="File Name" DockPanel.Dock="Left" VerticalContentAlignment="Center" Width="80" />
            <Button x:Name="Open" Content=".." Padding="10,0,10,0" DockPanel.Dock="Right" Click="Open_Click"
                    IsEnabled="False" />
            <TextBox x:Name="FileName" IsReadOnly="True" DockPanel.Dock="Left" IsEnabled="False" Margin="5,0,5,0"
                     VerticalContentAlignment="Center" />
        </DockPanel>

        <DockPanel DockPanel.Dock="Top" Margin="0,0,0,5" x:Name="HeaderDock">
            <Label Content="Header Row" Width="80" DockPanel.Dock="Left" VerticalContentAlignment="Center" />
            <CheckBox x:Name="HasHeader" DockPanel.Dock="Left" VerticalAlignment="Center" Margin="5,0,5,0"
                      Checked="HeaderRow_Checked" Unchecked="HeaderRow_Checked" />
            <Label x:Name="HeaderRowLabel" Content="Row #" DockPanel.Dock="Left" VerticalContentAlignment="Center" />
            <syncfusion:UpDown x:Name="HeaderRow" DockPanel.Dock="Left" Width="80"
                               ValueChanged="HeaderRow_ValueChanged" VerticalContentAlignment="Center" Margin="5,0,0,0"
                               TextAlignment="Center" MinValue="1">
                <syncfusion:UpDown.NumberFormatInfo>
                    <globalization:NumberFormatInfo NumberGroupSeparator="," NumberDecimalDigits="0"
                                                    NumberDecimalSeparator="." />
                </syncfusion:UpDown.NumberFormatInfo>
            </syncfusion:UpDown>
            <Label x:Name="ColumnWidthsLabel" Content="Column Widths" Margin="5,0,0,0" DockPanel.Dock="Left"
                   VerticalContentAlignment="Center" />
            <Button x:Name="EditScript" DockPanel.Dock="Right" Padding="10,0,10,0" Margin="5,0,0,0" Content="Script"
                    Click="EditScript_Click" />
            <TextBox x:Name="ColumnWidths" DockPanel.Dock="Left" Margin="5,0,0,0" VerticalContentAlignment="Center"
                     TextChanged="ColumnWidths_TextChanged" />
        </DockPanel>

        <DockPanel DockPanel.Dock="Bottom">
            <Button x:Name="Reset" DockPanel.Dock="Left" Height="35" Width="100" Margin="0,0,5,0" Content="Reset"
                    Click="Reset_Click" />
            <Button x:Name="Match" DockPanel.Dock="Left" Height="35" Width="100" Margin="0,0,5,0"
                    Content="Match Fields" Click="Match_Click" />
            <Button x:Name="HideBlank" DockPanel.Dock="Left" Height="35" Width="100" Margin="0,0,5,0"
                    Content="Hide Blank" Click="HideBlank_Click" />
            <Button x:Name="Save" DockPanel.Dock="Left" Height="35" Width="100" Margin="20,0,5,0" Content="Save"
                    Click="Save_Click" />
            <Button x:Name="Load" DockPanel.Dock="Left" Height="35" Width="100" Margin="0,0,5,0" Content="Load"
                    Click="Load_Click" />
            <Button x:Name="Cancel" DockPanel.Dock="Right" Height="35" Width="80" Margin="5,0,0,0" Content="Cancel"
                    Click="Cancel_Click" />
            <Button x:Name="OK" DockPanel.Dock="Right" Height="35" Width="80" Margin="5,0,0,0" Content="OK"
                    Click="OK_Click" IsEnabled="False" />
            <Label DockPanel.Dock="Left" />
        </DockPanel>

        <local:DynamicImportMappingGrid x:Name="Mappings" DockPanel.Dock="Top" Margin="0,0,0,5" />

    </DockPanel>
</wpf:ThemableWindow>