<local:RelhaxFeatureWindowWithChanges
    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:RelhaxModpack.Windows"
    xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    xmlns:RelhaxModpack="clr-namespace:RelhaxModpack"
    xmlns:database="clr-namespace:RelhaxModpack.Database"
    xmlns:enums="clr-namespace:RelhaxModpack.Utilities.Enums"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    x:Class="RelhaxModpack.Windows.DatabaseEditor"
    mc:Ignorable="d"
    Title="DatabaseEditor" Height="720" Width="1280" MinHeight="600" MinWidth="800" Icon="/RelhaxModpack;component/Resources/modpack_icon.ico"
    Loaded="OnApplicationLoad" LocalizeWindow="False" ApplyToolTips="False">
    <local:RelhaxWindow.Resources>
        <Style TargetType="Grid" BasedOn="{StaticResource DarkThemeStyleBackgroundGridInTabItem}">

        </Style>
        <Style TargetType="RichTextBox" BasedOn="{StaticResource DarkThemeStyleBackgroundForeground}">

        </Style>
        <!-- https://stackoverflow.com/questions/8198645/wpf-combobox-performance-problems-by-binding-a-large-collections -->
        <ItemsPanelTemplate x:Key="VSP">
            <VirtualizingStackPanel VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling"/>
        </ItemsPanelTemplate>
        <Style x:Key="FocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#FFF0F0F0" Offset="0.0"/>
            <GradientStop Color="#FFE5E5E5" Offset="1.0"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ComboBox.Static.Border" Color="#FFACACAC"/>
        <SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="#FFFFFFFF"/>
        <SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="#FFABADB3"/>
        <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
        <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
        <SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#FF000000"/>
        <LinearGradientBrush x:Key="ComboBox.MouseOver.Background" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#FFECF4FC" Offset="0.0"/>
            <GradientStop Color="#FFDCECFC" Offset="1.0"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="#FF7EB4EA"/>
        <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="#FFFFFFFF"/>
        <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="#FF7EB4EA"/>
        <LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#FFEBF4FC" Offset="0.0"/>
            <GradientStop Color="#FFDCECFC" Offset="1.0"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="#FF7EB4EA"/>
        <SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#FF000000"/>
        <LinearGradientBrush x:Key="ComboBox.Pressed.Background" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#FFDAECFC" Offset="0.0"/>
            <GradientStop Color="#FFC4E0FC" Offset="1.0"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="#FF569DE5"/>
        <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="#FFFFFFFF"/>
        <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="#FF569DE5"/>
        <LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#FFDAEBFC" Offset="0.0"/>
            <GradientStop Color="#FFC4E0FC" Offset="1.0"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="#FF569DE5"/>
        <SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF"/>
        <SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="#FFF0F0F0"/>
        <SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="#FFD9D9D9"/>
        <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="#FFFFFFFF"/>
        <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="#FFBFBFBF"/>
        <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
        <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
        <SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF606060"/>
        <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="ClickMode" Value="Press"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border x:Name="templateRoot" BorderBrush="{StaticResource ComboBox.Static.Border}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource ComboBox.Static.Background}" SnapsToDevicePixels="true">
                            <Border x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" Margin="0" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
                                <Path x:Name="arrow" Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/>
                            </Border>
                        </Border>
                        <ControlTemplate.Triggers>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
                                    <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false"/>
                                    <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false"/>
                                    <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Background}"/>
                                <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Border}"/>
                                <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Background}"/>
                                <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Border}"/>
                            </MultiDataTrigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
                            </Trigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
                                    <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Background}"/>
                                <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Border}"/>
                            </MultiDataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
                                    <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Background}"/>
                                <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Border}"/>
                                <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}"/>
                                <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}"/>
                            </MultiDataTrigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
                            </Trigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
                                    <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Background}"/>
                                <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Border}"/>
                            </MultiDataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
                                    <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Background}"/>
                                <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Border}"/>
                                <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}"/>
                                <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}"/>
                            </MultiDataTrigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
                            </Trigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
                                    <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Background}"/>
                                <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Border}"/>
                            </MultiDataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
                                    <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Background}"/>
                                <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Border}"/>
                                <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}"/>
                                <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}"/>
                            </MultiDataTrigger>
                            <!-- custom triggers begin here -->
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding DarkTheme, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:RelhaxWindow}}}" Value="True"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource DarkThemeCombobox}"/>
                                <Setter Property="Fill" TargetName="arrow" Value="White"/>
                            </MultiDataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
                                    <Condition Binding="{Binding DarkTheme, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:RelhaxWindow}}}" Value="True"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource DarkThemeComboboxHighlight}"/>
                                <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource DarkThemeComboboxHighlight}"/>
                                <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource DarkThemeComboboxHighlight}"/>
                            </MultiDataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
                                    <Condition Binding="{Binding DarkTheme, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:RelhaxWindow}}}" Value="True"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Background}"/>
                            </MultiDataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
                                    <Condition Binding="{Binding DarkTheme, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:RelhaxWindow}}}" Value="True"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource DarkThemeActiveTab}"/>
                            </MultiDataTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
            <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
                </Grid.ColumnDefinitions>
                <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
                    <Themes:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}">
                        <Border x:Name="dropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
                            <ScrollViewer x:Name="DropDownScrollViewer">
                                <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
                                    <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
                                        <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
                                    </Canvas>
                                    <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                </Grid>
                            </ScrollViewer>
                        </Border>
                    </Themes:SystemDropShadowChrome>
                </Popup>
                <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
                <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
                    <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
                    <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
                </Trigger>
                <Trigger Property="HasItems" Value="false">
                    <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
                </Trigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsGrouping" Value="true"/>
                        <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
                    </MultiTrigger.Conditions>
                    <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                </MultiTrigger>
                <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
                    <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
                    <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <SolidColorBrush x:Key="TextBox.Static.Background" Color="LightGreen"/>
        <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="AllowDrop" Value="true"/>
            <Setter Property="MinWidth" Value="0"/>
            <Setter Property="MinHeight" Value="0"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TextBox}">
                        <ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
            <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
                </Grid.ColumnDefinitions>
                <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
                    <Themes:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}">
                        <Border x:Name="dropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
                            <ScrollViewer x:Name="DropDownScrollViewer">
                                <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
                                    <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
                                        <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
                                    </Canvas>
                                    <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                </Grid>
                            </ScrollViewer>
                        </Border>
                    </Themes:SystemDropShadowChrome>
                </Popup>
                <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
                <Border x:Name="border" Background="{StaticResource TextBox.Static.Background}" Margin="{TemplateBinding BorderThickness}">
                    <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </Border>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsEnabled" Value="false">
                    <Setter Property="Opacity" TargetName="border" Value="0.56"/>
                </Trigger>
                <Trigger Property="IsKeyboardFocusWithin" Value="true">
                    <Setter Property="Foreground" Value="Black"/>
                </Trigger>
                <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
                    <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
                    <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
                </Trigger>
                <Trigger Property="HasItems" Value="false">
                    <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
                </Trigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsGrouping" Value="true"/>
                        <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
                    </MultiTrigger.Conditions>
                    <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                </MultiTrigger>
                <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
                    <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
                    <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
                </Trigger>
                <!-- custom triggers begin here -->
                <DataTrigger Binding="{Binding DarkTheme, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:RelhaxWindow}}}" Value="True">
                    <Setter Property="Background" TargetName="dropDownBorder" Value="{StaticResource DarkThemeCombobox}"/>
                    <Setter Property="Background" TargetName="border" Value="{StaticResource DarkThemeCombobox}"/>
                </DataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
                        <Condition Binding="{Binding DarkTheme, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:RelhaxWindow}}}" Value="True"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Background" TargetName="dropDownBorder" Value="{StaticResource DarkThemeActiveTab}"/>
                    <Setter Property="Background" TargetName="border" Value="{StaticResource DarkThemeActiveTab}"/>
                </MultiDataTrigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
            <Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
            <Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="Padding" Value="6,3,5,3"/>
            <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
            <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
            <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
            <Style.Triggers>
                <Trigger Property="IsEditable" Value="true">
                    <Setter Property="IsTabStop" Value="false"/>
                    <Setter Property="Padding" Value="2"/>
                    <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
                </Trigger>
                <!-- custom triggers -->
                <DataTrigger Binding="{Binding DarkTheme, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:RelhaxWindow}}}" Value="True">
                    <Setter Property="Foreground" Value="{StaticResource DarkThemeTextColor}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </local:RelhaxWindow.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="632*"/>
            <RowDefinition Height="60"/>
        </Grid.RowDefinitions>
        <Button x:Name="AddDatabaseObjectButton"    Content="Add/Copy"     HorizontalAlignment="Left"  Margin="10,0,0,5"    Grid.Row="1" VerticalAlignment="Bottom" Width="75" Height="20"
                Click="AddDatabaseObjectButton_Click"    IsEnabled="False" ToolTipService.ShowOnDisabled="True" ToolTip="Add a package to the database by making a copy of the selected package"/>
        <Button x:Name="RemoveDatabaseObjectButton" Content="Remove"       HorizontalAlignment="Left"  Margin="90,0,0,5"    Grid.Row="1" VerticalAlignment="Bottom" Width="75" Height="20"
                Click="RemoveDatabaseObjectButton_Click" IsEnabled="False" ToolTipService.ShowOnDisabled="True" ToolTip="Remove the selected package from the database"/>
        <Button x:Name="MoveDatabaseObjectButton"   Content="Move"         HorizontalAlignment="Left"  Margin="170,0,0,5"   Grid.Row="1" VerticalAlignment="Bottom" Width="75" Height="20"
                Click="MoveDatabaseObjectButton_Click"   IsEnabled="False" ToolTipService.ShowOnDisabled="True" ToolTip="Move the selected package to below another package.\nSupports moving between package types"/>
        <Button x:Name="TriggerMirrorSyncButton"    Content="Trigger Sync" HorizontalAlignment="Left"  Margin="250,0,0,5"   Grid.Row="1" VerticalAlignment="Bottom" Width="75" Height="20"
                Click="TriggerMirrorSyncButton_Click"    IsEnabled="True"  ToolTipService.ShowOnDisabled="True" ToolTip="Trigger a manual sync to our download mirror(s)"/>
        <Button x:Name="ApplyButton"                Content="Apply"        HorizontalAlignment="Right" Margin="0,0,170,5"  Grid.Row="1" VerticalAlignment="Bottom" Width="75" Height="45"
                Click="ApplyButton_Click"                IsEnabled="False" ToolTipService.ShowOnDisabled="True" ToolTip="Apply any changes from the right tab to the selected package"/>
        <Button x:Name="LoadAsDatabaseButton"       Content="Load as..."   HorizontalAlignment="Right" Margin="0,0,90,5"    Grid.Row="1" VerticalAlignment="Bottom" Width="75" Height="20"
                Click="LoadAsDatabaseButton_Click" ToolTipService.ShowOnDisabled="True" ToolTip="Select the database to load from a file dialog"/>
        <Button x:Name="LoadDatabaseButton"         Content="Load"         HorizontalAlignment="Right" Margin="0,0,90,30"   Grid.Row="1" VerticalAlignment="Bottom" Width="75" Height="20"
                Click="OnLoadDatabaseClick"        ToolTipService.ShowOnDisabled="True" ToolTip="Select the database to load directly from a saved settings location"/>
        <Button x:Name="SaveAsDatabaseButton"       Content="Save as..."   HorizontalAlignment="Right" Margin="0,0,10,5"    Grid.Row="1" VerticalAlignment="Bottom" Width="75" Height="20"
                Click="SaveAsDatabaseButton_Click" ToolTipService.ShowOnDisabled="True" ToolTip="Select a location from a file dialog to save the database"/>
        <Button x:Name="SaveDatabaseButton"         Content="Save"         HorizontalAlignment="Right" Margin="0,0,10,30"   Grid.Row="1" VerticalAlignment="Bottom" Width="75" Height="20"
                Click="SaveDatabaseButton_Click"   ToolTipService.ShowOnDisabled="True" ToolTip="Directly save the database to a saved settings location"/>
        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.ColumnSpan="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" MinWidth="250"/>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="*" MinWidth="250"/>
            </Grid.ColumnDefinitions>
            <GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Center"/>
            <TabControl x:Name="LeftTabView" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" SelectionChanged="LeftTabView_SelectionChanged">
                <TabItem x:Name="DatabaseViewTab" Header="Database Tree View">
                    <TreeView x:Name="DatabaseTreeView" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AllowDrop="True" Drop="OnTreeViewDatabaseDrop"
                              DragOver="OnTreeViewDatabaseDragOver"  ScrollViewer.ScrollChanged="OnTreeViewScroll" PreviewMouseDown="OnTreeViewMouseDownPreview"
                              PreviewMouseUp="OnTreeViewMouseUpPreview" SelectedItemChanged="DatabaseTreeView_SelectedItemChanged" KeyDown="DatabaseTreeView_KeyDown"
                              PreviewMouseMove="DatabaseTreeView_PreviewMouseMove" Style="{StaticResource DarkThemeStyleBackground}">
                        <TreeView.Resources>
                            <!-- Style the inactive selection the same as active -->
                            <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" />
                            <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightTextColorKey}}"/>
                        </TreeView.Resources>
                    </TreeView>
                </TabItem>
                <TabItem x:Name="InstallGroupsTab" Header="Install Groups" ToolTip="View the current install groups that will be formed when an installation is started">
                    <TreeView x:Name="InstallGroupsTreeView" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AllowDrop="False" Style="{StaticResource DarkThemeStyleBackground}">
                        <TreeView.Resources>
                            <!-- Style the inactive selection the same as active -->
                            <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" />
                            <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightTextColorKey}}"/>
                        </TreeView.Resources>
                    </TreeView>
                </TabItem>
                <TabItem x:Name="PatchGroupsTab" Header="Patch Groups" ToolTip="View the current patch groups that will be formed when an installation is started">
                    <TreeView x:Name="PatchGroupsTreeView" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AllowDrop="False" Style="{StaticResource DarkThemeStyleBackground}">
                        <TreeView.Resources>
                            <!-- Style the inactive selection the same as active -->
                            <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" />
                            <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightTextColorKey}}"/>
                        </TreeView.Resources>
                    </TreeView>
                </TabItem>
                <TabItem x:Name="SettingsTab" Header="Settings" ToolTip="View and edit settings of this tool">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="20"/>
                            <RowDefinition Height="20"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="45"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="45"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="35"/>
                            <RowDefinition Height="20"/>
                            <RowDefinition Height="35"/>
                            <RowDefinition Height="20"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="150"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock x:Name="BigmodsUsernameTextBox" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="Bigmods Username" VerticalAlignment="Center" Grid.Column="0" Grid.Row="0"
                                   ToolTip="Enter your FTP account user name to enable FTP integration features"/>
                        <TextBlock x:Name="BigmodsPasswordTextBox" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="Bigmods Password" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1"
                                   ToolTip="Enter your FTP account password to enable FTP integration features"/>
                        <CheckBox x:Name="SaveSelectionBeforeLeaveSetting" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1" Grid.Row="2" Content="Save Selection information before leave (auto apply)"
                                  Click="SaveSelectionBeforeLeaveSetting_Click" ToolTip="When selecting a new package in the Database view,\nthe application will automatically apply changes before changing to the new selection"/>
                        <TextBlock x:Name="ApplyBehaviorTextBox" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="Apply Behavior" VerticalAlignment="Center" Grid.Column="0" Grid.Row="4"
                                   ToolTip="Change the behavior of how the application auto-applies and auto-saves your work"/>
                        <TextBox x:Name="BigmodsUsernameSetting" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0" TextChanged="BigmodsUsernameSetting_TextChanged"/>
                        <TextBox x:Name="BigmodsPasswordSetting" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1" TextChanged="BigmodsPasswordSetting_TextChanged"/>
                        <StackPanel HorizontalAlignment="Left" Grid.Column="1" Grid.Row="4">
                            <RadioButton x:Name="ApplyBehaviorDefaultSetting" Content="Default" Checked="ApplyBehaviorSetting_Checked" ToolTip="No auto-apply or auto-save features"/>
                            <RadioButton x:Name="ApplyBehaviorApplyTriggersSaveSetting" Content="Apply triggers Save" Checked="ApplyBehaviorSetting_Checked" ToolTip="Pressing &quot;Apply&quot; button will press &quot;Save&quot; afterwards"/>
                            <RadioButton x:Name="ApplyBehaviorSaveTriggersApplySetting" Content="Save triggers Apply" Checked="ApplyBehaviorSetting_Checked" ToolTip="Pressing &quot;Save&quot; button will first press &quot;Apply&quot;"/>
                        </StackPanel>
                        <CheckBox x:Name="ShowConfirmOnPackageApplySetting" Grid.Column="1" HorizontalAlignment="Left"  Grid.Row="5" VerticalAlignment="Center" Content="Show confirmation window on package apply"
                                  Click="ShowConfirmOnPackageApplySetting_Click" ToolTip="Show a message box to confirm changes to be applied when pressing the &quot;Apply&quot; button"/>
                        <CheckBox x:Name="ShowConfirmOnPackageAddRemoveEditSetting" Grid.Column="1" HorizontalAlignment="Left"  Grid.Row="6" VerticalAlignment="Center" Content="Show confirmation on package add/remove/move"
                                  Click="ShowConfirmOnPackageAddRemoveEditSetting_Click" ToolTip="Show a message box to confirm when pressing one of the add/move/remove buttons"/>
                        <Button x:Name="SelectDefaultSaveLocationButton" Content="Select default save location" HorizontalAlignment="Stretch" Grid.Row="7" VerticalAlignment="Center" Click="SelectDefaultSaveLocationButton_Click"
                                ToolTip="Select the location to use for the &quot;Save&quot; and &quot;Load&quot; buttons"/>
                        <TextBox x:Name="DefaultSaveLocationSetting" Grid.Column="1" HorizontalAlignment="Stretch" Grid.Row="7" TextWrapping="Wrap" VerticalAlignment="Center" TextChanged="DefaultSaveLocationSetting_TextChanged" />
                        <TextBlock x:Name="FtpUpDownAutoCloseTimeoutLabel" HorizontalAlignment="Stretch" Grid.Row="8" TextWrapping="Wrap" Text="FTP U/L and D/L auto close timeout" VerticalAlignment="Center"
                                   ToolTip="Select the time, in seconds, for the FTP upload/download window to automatically be closed. Select 0 to disable automatic closing"/>
                        <Grid x:Name="FtpUpDownAutoCloseTimoutPanel" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="10*"/>
                                <ColumnDefinition Width="1*"/>
                            </Grid.ColumnDefinitions>
                            <Slider x:Name="FtpUpDownAutoCloseTimoutSlider" HorizontalAlignment="Stretch" VerticalAlignment="Center" IsEnabled="True" ValueChanged="FtpUpDownAutoCloseTimoutSlider_ValueChanged" IsSnapToTickEnabled="True"/>
                            <TextBlock x:Name="FtpUpDownAutoCloseTimoutDisplayLabel" HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="Test" Grid.Column="1"/>
                        </Grid>
                        <CheckBox x:Name="DatabaseTransferAutoDelete" Grid.Column="1" HorizontalAlignment="Left" Grid.Row="10" VerticalAlignment="Center" Content="Automatically delete package locally upon successful upload"
                                  Click="DatabaseTransferAutoDelete_Click" ToolTip="When checked, a package that is successfully uploaded will be automatically deleted from disk"/>
                        <CheckBox x:Name="DatabaseTransferDeleteActuallyMove" Grid.Column="1" HorizontalAlignment="Left"  Grid.Row="11" VerticalAlignment="Center" Content="Editor transfer window's delete button is actually move"
                                  Click="DatabaseTransferDeleteActuallyMove_Click" ToolTip="When checked, the delete file button in the editor file transfer window will actually move the file into the folder specified below"/>
                        <Button x:Name="SelectTransferWindowMovePathButton" HorizontalAlignment="Stretch" Grid.Row="12" VerticalAlignment="Center" Click="SelectTransferWindowMovePathButton_Click"
                                ToolTip="Select the folder to use for the editor transfer window, when upload mode and the above option 'delete is actually move' is checked">
                            <TextBlock x:Name="SelectTransferWindowMovePathTextblock" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextWrapping="Wrap"
                                       Text="Select transfer window's upload move directory"/>
                        </Button>
                        <TextBox x:Name="SelectTransferWindowMovePathTextbox" Grid.Column="1" HorizontalAlignment="Stretch" Grid.Row="12" TextWrapping="Wrap" VerticalAlignment="Center"
                                 TextChanged="SelectTransferWindowMovePathTextbox_TextChanged" />
                    </Grid>
                </TabItem>
                <TabItem x:Name="DescriptionHelperTab" Header="How to use" ToolTip="Read some documentation on this tool">
                    <Grid>
                        <RichTextBox x:Name="DescriptionHelperTextBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="True"
                                     HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" IsReadOnly="True" SpellCheck.IsEnabled="True" IsDocumentEnabled="True">
                            <FlowDocument>
                                <Paragraph TextAlignment="Center">
                                    Welcome to the Editor "How To"
                                </Paragraph>
                                <Paragraph>
                                    Useful Macros:
                                </Paragraph>
                                <List>
                                    <ListItem>
                                        <Paragraph>
                                            CRTL+ALT+CLICK AND DRAG To copy and move a package into another package level
                                        </Paragraph>
                                    </ListItem>
                                    <ListItem>
                                        <Paragraph>
                                            Double click URL's to open them
                                        </Paragraph>
                                    </ListItem>
                                    <ListItem>
                                        <Paragraph>
                                            CRTL+CLICK AND DRAG to copy a package
                                        </Paragraph>
                                    </ListItem>
                                </List>
                                <List>
                                    <ListItem>
                                        <Paragraph>
                                            <Hyperlink NavigateUri="https://docs.google.com/document/d/1o2CXmhuPrQlk0PQUYRlatzep2ImRtW3DRG-7zl1B0rk/edit">Documentation user guide</Hyperlink>
                                        </Paragraph>
                                    </ListItem>
                                    <ListItem>
                                        <Paragraph>
                                            <Hyperlink NavigateUri="https://docs.google.com/spreadsheets/d/1VPKXRB-e7tcxNwWyrNIKCft-lIUhWunYxeSOCNe3zw8/edit">Database Standards</Hyperlink>
                                        </Paragraph>
                                    </ListItem>
                                </List>
                            </FlowDocument>
                        </RichTextBox>
                    </Grid>
                </TabItem>
            </TabControl>
            <TabControl Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,22,0,0" x:Name="RightTab">
                <TabItem x:Name="BasicTab" Header="Basic">
                    <Grid Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <!-- Spacer -->
                            <RowDefinition Height="20"/>
                            <!-- Package display name -->
                            <RowDefinition Height="20"/>
                            <!-- Package internal name -->
                            <RowDefinition Height="20"/>
                            <!-- Zip file -->
                            <RowDefinition Height="40"/>
                            <!-- Package version (mod version) -->
                            <RowDefinition Height="20"/>
                            <!-- Package author (mod author) -->
                            <RowDefinition Height="20"/>
                            <!-- Package maintainers -->
                            <RowDefinition Height="20"/>
                            <!-- Package selection type -->
                            <RowDefinition Height="20"/>
                            <!-- Package install group -->
                            <RowDefinition Height="20"/>
                            <!-- Package patch group -->
                            <RowDefinition Height="20"/>
                            <!-- Package UID -->
                            <RowDefinition Height="20"/>
                            <!-- Tree level -->
                            <RowDefinition Height="20"/>
                            <!-- Calculated tree level from selection POV -->
                            <RowDefinition Height="20"/>
                            <!-- Zip file last updated timestamp -->
                            <RowDefinition Height="20"/>
                            <!-- Last package update check timestamp -->
                            <RowDefinition Height="40"/>
                            <!-- spacer -->
                            <RowDefinition Height="20"/>
                            <!-- checkboxes -->
                            <RowDefinition Height="80"/>
                            <!-- space between checkboxes and download zip button -->
                            <RowDefinition Height="20"/>
                            <!-- download button -->
                            <RowDefinition Height="40"/>
                            <!-- upload spacer -->
                            <RowDefinition Height="2"/>
                            <!-- upload button-->
                            <RowDefinition Height="40"/>
                            <!-- extra space -->
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <!-- Names -->
                        <TextBlock x:Name="PackageDisplayNameTextBlock" HorizontalAlignment="Stretch" Grid.Row="1" TextWrapping="Wrap" Text="Name" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageNameTextBlock" HorizontalAlignment="Stretch" Grid.Row="2" TextWrapping="Wrap" Text="Package Name" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageZipFileTextBlock" HorizontalAlignment="Stretch" Grid.Row="3" TextWrapping="Wrap" Text="Zip File" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageVersionTextBlock" HorizontalAlignment="Stretch" Grid.Row="4" TextWrapping="Wrap" Text="Version" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageAuthorTextBlock" HorizontalAlignment="Stretch" Grid.Row="5" TextWrapping="Wrap" Text="Author" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageMaintainersTextBlock" HorizontalAlignment="Stretch" Grid.Row="6" TextWrapping="Wrap" Text="Maintainers" VerticalAlignment="Center" ToolTip="Comma separated values of Database managers of this component"/>
                        <TextBlock x:Name="PakageTypeTextBlock" HorizontalAlignment="Stretch" Grid.Row="7" TextWrapping="Wrap" Text="Type" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageInstallGroupTextBlock" HorizontalAlignment="Stretch" Grid.Row="8" TextWrapping="Wrap" Text="Install Group" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackagePatchGroupTextBlock" HorizontalAlignment="Stretch" Grid.Row="9" TextWrapping="Wrap" Text="Patch Group" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageUidTextBlock" HorizontalAlignment="Stretch" Grid.Row="10" TextWrapping="Wrap" Text="UID:" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageLevelTextBlock" HorizontalAlignment="Stretch" Grid.Row="11" TextWrapping="Wrap" Text="Tree Level:" VerticalAlignment="Center" ToolTip="The sublevel in the category tree where this package exists"/>
                        <TextBlock x:Name="PackageCalculatedLevelTextBlock" HorizontalAlignment="Stretch" Grid.Row="12" TextWrapping="Wrap" Text="Calculated Level:" VerticalAlignment="Center"
                                   ToolTip="The calculated sublevel during installation, if 'Offset InstallGroup' for the category is enabled"/>
                        <TextBlock x:Name="PackageLastUpdatedTextBlock" HorizontalAlignment="Stretch" Grid.Row="13" TextWrapping="Wrap" Text="Last Updated:" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageLastCheckForUpdateTextBlock" HorizontalAlignment="Stretch" Grid.Row="14" TextWrapping="Wrap" Text="Last Check for Update:" VerticalAlignment="Center"/>
                        <!-- Values -->
                        <TextBox x:Name="PackageNameDisplay" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="1"  TextWrapping="Wrap" VerticalAlignment="Center" />
                        <TextBox x:Name="PackagePackageNameDisplay" HorizontalAlignment="Stretch" Grid.Row="2" Grid.Column="1"  TextWrapping="Wrap" VerticalAlignment="Center" />
                        <TextBox x:Name="PackageZipFileDisplay" HorizontalAlignment="Stretch" Grid.Row="3" Grid.Column="1"  TextWrapping="Wrap" VerticalAlignment="Stretch" />
                        <TextBox x:Name="PackageVersionDisplay" HorizontalAlignment="Stretch" Grid.Row="4" Grid.Column="1"  TextWrapping="Wrap" VerticalAlignment="Center" />
                        <TextBox x:Name="PackageAuthorDisplay" HorizontalAlignment="Stretch" Grid.Row="5" Grid.Column="1" TextWrapping="Wrap" VerticalAlignment="Center" />
                        <TextBox x:Name="PackageMaintainersDisplay" HorizontalAlignment="Stretch" Grid.Row="6" Grid.Column="1" TextWrapping="Wrap" VerticalAlignment="Center" ToolTip="Comma separated values of Database managers of this component"/>
                        <ComboBox x:Name="PackageTypeDisplay" HorizontalAlignment="Stretch" Grid.Row="7" Grid.Column="1" VerticalAlignment="Center">
                            <enums:SelectionTypes>none</enums:SelectionTypes>
                            <enums:SelectionTypes>single1</enums:SelectionTypes>
                            <enums:SelectionTypes>single_dropdown1</enums:SelectionTypes>
                            <enums:SelectionTypes>single_dropdown2</enums:SelectionTypes>
                            <enums:SelectionTypes>multi</enums:SelectionTypes>
                        </ComboBox>
                        <ComboBox x:Name="PackageInstallGroupDisplay" HorizontalAlignment="Stretch" Grid.Row="8" Grid.Column="1" VerticalAlignment="Center" IsEditable="True"/>
                        <ComboBox x:Name="PackagePatchGroupDisplay" HorizontalAlignment="Stretch" Grid.Row="9" Grid.Column="1" VerticalAlignment="Center" IsEditable="True"/>
                        <TextBox x:Name="PackageUidDisplay" HorizontalAlignment="Stretch" Grid.Row="10" Grid.Column="1" VerticalAlignment="Center" IsEnabled="True" IsReadOnly="True"/>
                        <TextBlock x:Name="PackageLevelDisplay" HorizontalAlignment="Stretch" Grid.Column="1" Grid.Row="11" TextWrapping="Wrap" VerticalAlignment="Stretch"/>
                        <TextBlock x:Name="PackageCalculatedLevelDisplay" HorizontalAlignment="Stretch" Grid.Column="1" Grid.Row="12" TextWrapping="Wrap" VerticalAlignment="Stretch"/>
                        <TextBlock x:Name="PackageLastUpdatedDisplay" Grid.Column="1" HorizontalAlignment="Stretch" Grid.Row="13" TextWrapping="Wrap" VerticalAlignment="Center"/>
                        <TextBlock x:Name="PackageLastCheckForUpdateDisplay" Grid.Column="1" HorizontalAlignment="Stretch" Grid.Row="14" TextWrapping="Wrap" VerticalAlignment="Top"/>
                        <Button x:Name="PackageJustCheckedForUpdateButton" Grid.Column="1" HorizontalAlignment="Left" Grid.Row="14" VerticalAlignment="Bottom" MinWidth="100" MaxWidth="140" Padding="5,0,5,0" Content="I just checked" Click="PackageJustCheckedForUpdateButton_Click"/>
                        <Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="16" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="125"/>
                                <ColumnDefinition Width="175"/>
                                <ColumnDefinition Width="1*"/>
                                <ColumnDefinition Width="1*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="1*"/>
                                <RowDefinition Height="1*"/>
                                <RowDefinition Height="1*"/>
                                <RowDefinition Height="1*"/>
                            </Grid.RowDefinitions>
                            <CheckBox Grid.Row="0" Grid.Column="0" Content="Log At Install" x:Name="PackageLogAtInstallDisplay"/>
                            <CheckBox Grid.Row="0" Grid.Column="1" Content="Show In Search" x:Name="PackageShowInSearchListDisplay" />
                            <CheckBox Grid.Row="0" Grid.Column="2" Content="Popular" x:Name="PackagePopularModDisplay" />
                            <CheckBox Grid.Row="1" Grid.Column="0" Content="Grey Area" x:Name="PackageGreyAreaModDisplay" />
                            <CheckBox Grid.Row="1" Grid.Column="1" Content="Visible" x:Name="PackageVisibleDisplay" />
                            <CheckBox Grid.Row="1" Grid.Column="2" Content="Enabled" x:Name="PackageEnabledDisplay" />
                            <CheckBox Grid.Row="2" Grid.Column="0" Content="Obfuscated" x:Name="PackageObfuscatedModDisplay" />
                            <CheckBox Grid.Row="2" Grid.Column="1" Content="Offset InstallGroup" x:Name="CategoryOffsetInstallGroupDisplay" />
                            <CheckBox Grid.Row="2" Grid.Column="2" Content="From WGmods" x:Name="PackageFromWGmodsDisplay" />
                            <CheckBox Grid.Row="3" Grid.Column="0" Content="Deprecated" x:Name="PackageDeprecatedDisplay" />
                            <CheckBox Grid.Row="3" Grid.Column="1" Content="Minimalist mode exclude" x:Name="PackageMinimalistModeExcludeDisplay" ToolTip="When this is true, the package will be excluded from installation"/>
                        </Grid>
                        <Button Grid.Column="0" Grid.Row="18" HorizontalAlignment="Left" VerticalAlignment="Stretch" Content="Download Zip" x:Name="ZipDownload" Click="ZipDownload_Click" Grid.ColumnSpan="2" Width="200" />
                        <Button Grid.Column="0" Grid.Row="20" HorizontalAlignment="Left" VerticalAlignment="Stretch" Content="Upload Zip" x:Name="ZipUload" Click="ZipUpload_Click" Grid.ColumnSpan="2" Width="200" />
                    </Grid>
                </TabItem>
                <TabItem x:Name="DescriptionTab" Header="Description">
                    <Grid>
                        <TextBox x:Name="PackageDescriptionDisplay" TextWrapping="Wrap" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="True" MouseDoubleClick="PackageDisplayUrlParse_MouseDoubleClick"/>
                    </Grid>
                </TabItem>
                <TabItem x:Name="DevURLTab" Header="Dev URL">
                    <Grid>
                        <!--https://stackoverflow.com/questions/2650144/multiline-for-wpf-textbox-->
                        <TextBox x:Name="PackageDevURLDisplay" TextWrapping="Wrap" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,21,0,0" AcceptsReturn="True" AcceptsTab="True" MouseDoubleClick="PackageDevURLDisplay_MouseDoubleClick"/>
                        <TextBlock x:Name="PackageDevURLHeader" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Enter DevUrl's here, separated by new lines" VerticalAlignment="Top"/>
                    </Grid>
                </TabItem>
                <TabItem x:Name="InternalNotesTab" Header="Internal Notes">
                    <Grid>
                        <TextBox x:Name="PackageInternalNotesDisplay" TextWrapping="Wrap" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="True" MouseDoubleClick="PackageDisplayUrlParse_MouseDoubleClick"/>
                    </Grid>
                </TabItem>
                <TabItem x:Name="UpdateNotesTab" Header="Update Notes">
                    <Grid>
                        <TextBox x:Name="PackageUpdateNotesDisplay" TextWrapping="Wrap" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="True" MouseDoubleClick="PackageDisplayUrlParse_MouseDoubleClick"/>
                    </Grid>
                </TabItem>
                <TabItem x:Name="DependenciesTab" Header="Dependencies">
                    <Grid>
                        <ListBox x:Name="PackageDependenciesDisplay" HorizontalAlignment="Stretch" Height="179" VerticalAlignment="Top" SelectionChanged="PackageDependenciesDisplay_SelectionChanged" DisplayMemberPath="PackageName"
                                 MouseDoubleClick="PackageDependenciesDisplay_MouseDoubleClick"/>
                        <Button Content="Add selected" x:Name="DependenciesAddSelected" HorizontalAlignment="Left" Margin="0,210,0,0" VerticalAlignment="Top" Width="400" Click="DependenciesAddSelected_Click"/>
                        <Button Content="Remove Selected" x:Name="DependenciesRemoveSelected" HorizontalAlignment="Left" Margin="0,235,0,0" VerticalAlignment="Top" Width="400" Click="DependenciesRemoveSelected_Click"/>
                        <ComboBox x:Name="LoadedDependenciesList" HorizontalAlignment="Stretch" Margin="0,184,0,0" VerticalAlignment="Top" Height="22"/>
                        <TextBlock x:Name="DependenciesLogicTypeTextBlock" HorizontalAlignment="Left" Margin="0,260,0,0" TextWrapping="Wrap" Text="With Logic Type:" VerticalAlignment="Top"/>
                        <ComboBox x:Name="LoadedLogicsList" HorizontalAlignment="Left" Margin="0,281,0,0" VerticalAlignment="Top" Width="400">
                            <database:Logic>OR</database:Logic>
                            <database:Logic>AND</database:Logic>
                        </ComboBox>
                        <CheckBox x:Name="DependenciesNotFlag" Content="Set Not Flag" HorizontalAlignment="Left" Margin="0,308,0,0" VerticalAlignment="Top"/>
                        <Button Content="Apply Edit" x:Name="DependenciesApplyEditButton" HorizontalAlignment="Left" Margin="0,323,0,0" VerticalAlignment="Top" Width="400" Click="DependenciesApplyEditButton_Click"/>
                    </Grid>
                </TabItem>
                <TabItem x:Name="MediasTab" Header="Medias">
                    <Grid>
                        <ListBox x:Name="PackageMediasDisplay" HorizontalAlignment="Stretch" Height="179" VerticalAlignment="Top" SelectionChanged="PackageMediasDisplay_SelectionChanged" AllowDrop="True" DragOver="PackageMediasDisplay_DragOver" Drop="PackageMediasDisplay_Drop" MouseMove="PackageMediasDisplay_MouseMove" PreviewMouseDown="PackageMediasDisplay_PreviewMouseDown" PreviewMouseUp="PackageMediasDisplay_PreviewMouseUp" ScrollViewer.ScrollChanged="PackageMediasDisplay_ScrollChanged"/>
                        <Button Content="Add Media" x:Name="MediaAddMediaButton" HorizontalAlignment="Left" Margin="10,511,0,0" VerticalAlignment="Top" Width="100" Click="MediaAddMediaButton_Click"/>
                        <Button Content="Apply Edit" x:Name="MediaApplyEditButton" HorizontalAlignment="Left" Margin="230,511,0,0" VerticalAlignment="Top" Width="100" Click="MediaApplyEditButton_Click"/>
                        <Button Content="Remove Media" x:Name="MediaRemoveMediaButton" HorizontalAlignment="Left" Margin="10,486,0,0" VerticalAlignment="Top" Width="467" Click="MediaRemoveMediaButton_Click"/>
                        <ComboBox x:Name="MediaTypesList" HorizontalAlignment="Left" Margin="0,205,0,0" VerticalAlignment="Top" Width="477" Height="20">
                            <enums:MediaType>Picture</enums:MediaType>
                            <enums:MediaType>Webpage</enums:MediaType>
                            <enums:MediaType>MediaFile</enums:MediaType>
                            <enums:MediaType>HTML</enums:MediaType>
                        </ComboBox>
                        <TextBox x:Name="MediaTypesURL" HorizontalAlignment="Stretch" Height="173" Margin="0,258,0,0" VerticalAlignment="Top"
                                 TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="True"/>
                        <Button Content="Preview Selected Media" x:Name="MediaPreviewSelectedMediaButton" HorizontalAlignment="Left" Margin="10,461,0,0" VerticalAlignment="Top" Width="467" Click="MediaPreviewSelectedMediaButton_Click"/>
                        <Button Content="Preview Edit Media" x:Name="MediaPreviewEditMediaButton" HorizontalAlignment="Left" Margin="115,511,0,0" VerticalAlignment="Top" Width="110" Click="MediaPreviewEditMediaButton_Click"/>
                        <Button x:Name="UploadMediaButton" Content="Upload and add media" HorizontalAlignment="Left" Margin="10,436,0,0" VerticalAlignment="Top" Width="467" Click="UploadMediaButton_Click"/>
                        <TextBlock x:Name="MediaMediaTypeLabel" HorizontalAlignment="Left" Margin="0,184,0,0" TextWrapping="Wrap" Text="Media Type" VerticalAlignment="Top"/>
                        <TextBlock HorizontalAlignment="Left" Margin="0,238,0,0" TextWrapping="Wrap" Text="Media Data" VerticalAlignment="Top" Width="66" Height="20"/>
                    </Grid>
                </TabItem>
                <TabItem x:Name="UserDatasTab" Header="User files">
                    <Grid>
                        <ListBox x:Name="PackageUserFilesDisplay" HorizontalAlignment="Stretch" Height="179" VerticalAlignment="Top" SelectionChanged="PackageUserdatasDisplay_SelectionChanged" />
                        <Button Content="Add User file" x:Name="UserdataApplyUsedataButton" HorizontalAlignment="Left" Margin="10,291,0,0" VerticalAlignment="Top" Width="467" Click="UserdataAddUserdataButton_Click"/>
                        <Button Content="Apply Edit" x:Name="UserdataApplyEditButton" HorizontalAlignment="Left" Margin="10,341,0,0" VerticalAlignment="Top" Width="467" Click="UserdataApplyEditButton_Click"/>
                        <Button Content="Remove User file" x:Name="UserdataRemoveUserdata" HorizontalAlignment="Left" Margin="10,316,0,0" VerticalAlignment="Top" Width="467" Click="UserdataRemoveUserdata_Click"/>
                        <TextBox x:Name="UserDataEditBox" HorizontalAlignment="Stretch" Margin="0,184,0,0" VerticalAlignment="Top" Height="102"/>
                    </Grid>
                </TabItem>
                <TabItem x:Name="TriggersTab" Header="Triggers">
                    <Grid>
                        <ListBox x:Name="PackageTriggersDisplay" HorizontalAlignment="Stretch" Height="179" VerticalAlignment="Top" SelectionChanged="PackageTriggersDisplay_SelectionChanged" />
                        <Button Content="Add Trigger" x:Name="TriggerAddSelectedTrigger" HorizontalAlignment="Left" Margin="0,209,0,0" VerticalAlignment="Top" Width="467" Click="TriggerAddSelectedTrigger_Click"/>
                        <Button Content="Remove Trigger" x:Name="TriggerRemoveTrigger" HorizontalAlignment="Left" Margin="0,234,0,0" VerticalAlignment="Top" Width="467" Click="TriggerRemoveTrigger_Click"/>
                        <ComboBox x:Name="LoadedTriggersComboBox" HorizontalAlignment="Stretch" Margin="0,184,0,0" VerticalAlignment="Top" Height="20"/>
                        <RichTextBox x:Name="CurrentSupportedTriggers" HorizontalAlignment="Left" VerticalAlignment="Bottom" IsReadOnly="True">
                            <RichTextBox.Resources>
                                <Style TargetType="{x:Type Paragraph}">
                                    <Setter Property="Margin" Value="0" />
                                </Style>
                            </RichTextBox.Resources>
                            <FlowDocument>
                                <Paragraph>Currently Supported Triggers:</Paragraph>
                                <Paragraph>build_contour_icons - start the process of building the contour icons atlas files</Paragraph>
                                <Paragraph>create_shortcuts - start the process of creating the shortcuts</Paragraph>
                                <Paragraph>install_fonts - start the process of installing fonts</Paragraph>
                            </FlowDocument>
                        </RichTextBox>
                    </Grid>
                </TabItem>
                <TabItem x:Name="TagsTab" Header="Tags">
                    <Grid>
                        <ListBox x:Name="PackageTagsDisplay" HorizontalAlignment="Stretch" Height="179" VerticalAlignment="Top"/>
                        <Button Content="Add Tag" x:Name="TagAddSelectedTag" HorizontalAlignment="Left" Margin="0,209,0,0" VerticalAlignment="Top" Width="467" Click="TagAddSelectedTag_Click"/>
                        <Button Content="Remove Tag" x:Name="TagRemoveTag" HorizontalAlignment="Left" Margin="0,234,0,0" VerticalAlignment="Top" Width="467" Click="TagRemoveTag_Click"/>
                        <ComboBox x:Name="LoadedTagsComboBox" HorizontalAlignment="Stretch" Margin="0,184,0,0" VerticalAlignment="Top" Height="20"/>
                        <RichTextBox x:Name="CurrentTags" HorizontalAlignment="Left" VerticalAlignment="Bottom" IsReadOnly="True" Height="278">
                            <RichTextBox.Resources>
                                <Style TargetType="{x:Type Paragraph}">
                                    <Setter Property="Margin" Value="0" />
                                </Style>
                            </RichTextBox.Resources>
                            <FlowDocument>
                                <Paragraph>Current tags:</Paragraph>
                                <Paragraph>Patch - Patch instructions</Paragraph>
                                <Paragraph>XmlUnpack - Xml unpack instructions</Paragraph>
                                <Paragraph>Script - Python scripts</Paragraph>
                                <Paragraph>Atlas - Pre-built atlas files</Paragraph>
                                <Paragraph>AtlasBuilder - Atlas png files and/or instructions for building</Paragraph>
                                <Paragraph>ImagePNG - PNG images</Paragraph>
                                <Paragraph>ImageDDS - DDS images</Paragraph>
                                <Paragraph>GuiFlash - Action script shockwave flash (swf) files</Paragraph>
                                <Paragraph>GuiLoginVideo - Login video files</Paragraph>
                                <Paragraph>ConfigurationFileXml - Configuration files, xml data type</Paragraph>
                                <Paragraph>ConfigurationFileJson - Configuration files, json data type</Paragraph>
                                <Paragraph>ConfigurationFileXC - Configuration files, XVM</Paragraph>
                                <Paragraph>ConfigurationFileOther - Configuration files, Other</Paragraph>
                                <Paragraph>SoundBank - Sound bank (bnk/pck) files</Paragraph>
                                <Paragraph>DependencyLink - The package is a link for dependency, or is a logical link</Paragraph>
                                <Paragraph>OtherFiles - Misc files</Paragraph>
                            </FlowDocument>
                        </RichTextBox>
                    </Grid>
                </TabItem>
                <TabItem x:Name="ConflictingPackagesTab" Header="Conflicting Packages">
                    <Grid>
                        <ListBox x:Name="PackageConflictingPackagesDisplay" HorizontalAlignment="Stretch" Height="179" VerticalAlignment="Top" MouseDoubleClick="PackageConflictingPackagesDisplay_MouseDoubleClick"/>
                        <Button Content="Remove Conflicting package" x:Name="ConflictingPackagesRemoveConflictingPackage" HorizontalAlignment="Left" Margin="0,184,0,0" VerticalAlignment="Top" Width="171" Click="ConflictingPackagesRemoveConflictingPackage_Click"/>
                        <TextBlock x:Name="ConflictingPackagesMessagebox" HorizontalAlignment="Left" Height="20" Margin="0,209,0,0" TextWrapping="Wrap" Text="To add a package to the list, search it above and right click it" VerticalAlignment="Top" />
                    </Grid>
                </TabItem>
                <TabItem x:Name="PatchesTab" Header="Patches">
                    <Grid>
                        <!-- NEWLINE =&#10; -->
                        <ListBox x:Name="PackagePatchesDisplay" HorizontalAlignment="Stretch" Height="188" VerticalAlignment="Top" SelectionChanged="PackagePatchesDisplay_SelectionChanged"/>
                        <TextBlock x:Name="PatchFilePathLabel" HorizontalAlignment="Left" Margin="0,193,0,0" TextWrapping="Wrap" Text="Patch file path" VerticalAlignment="Top" ToolTip="'file' parameter of patch xml"/>
                        <TextBox x:Name="PatchFilePathTextbox" HorizontalAlignment="Stretch" Height="37" Margin="0,209,0,0" TextWrapping="Wrap" VerticalAlignment="Top" ToolTip="'file' parameter of patch xml"/>
                        <Grid HorizontalAlignment="Stretch" Height="116" Margin="0,251,0,0" VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="1*"/>
                                <ColumnDefinition Width="2*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="22"/>
                                <RowDefinition Height="22"/>
                                <RowDefinition Height="22"/>
                                <RowDefinition Height="22"/>
                                <RowDefinition Height="22"/>
                            </Grid.RowDefinitions>
                            <TextBlock x:Name="PatchVersionHeader" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" Grid.Row="0" Grid.Column="0" Text="Patch Version"
                                   ToolTip="Select the version of the patch file to be used in the installer.&#10;Version 2 allows for the use of followPath option for json."/>
                            <ComboBox x:Name="PatchVersionCombobox" HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="120" Grid.Column="1" Grid.Row="0" Margin="0,1,0,1"
                                  ToolTip="Select the version of the patch file to be used in the installer.&#10;Version 2 allows for the use of followPath option for json." SelectionChanged="PatchVersionCombobox_SelectionChanged">
                                <System:Int32>1</System:Int32>
                                <System:Int32>2</System:Int32>
                            </ComboBox>
                            <TextBlock x:Name="PatchPathHeader" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="Patch Path Macro" VerticalAlignment="Stretch" Grid.Row="1"
                                   ToolTip="app = World_of_Tanks directory &#10;appData = C:\Users\{username}\AppData\Roaming\Wargaming.net\WorldOfTanks"/>
                            <ComboBox x:Name="PatchPathCombobox" HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="120" Grid.Column="1" Margin="0,1,0,1" Grid.Row="1"
                                  ToolTip="app = World_of_Tanks directory &#10;appData = C:\Users\{username}\AppData\Roaming\Wargaming.net\WorldOfTanks">
                                <System:String>app</System:String>
                                <System:String>appData</System:String>
                            </ComboBox>
                            <TextBlock x:Name="PatchTypeHeader" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="Patch Type" VerticalAlignment="Stretch" Grid.Row="2" />
                            <ComboBox x:Name="PatchTypeCombobox" HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="120" Margin="0,1,0,1" Grid.Column="1" Grid.Row="2" SelectionChanged="PatchTypeCombobox_SelectionChanged">
                                <System:String>json</System:String>
                                <System:String>xml</System:String>
                                <System:String>regex</System:String>
                            </ComboBox>
                            <TextBlock x:Name="PatchModeHeader" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="Mode" VerticalAlignment="Stretch" Height="22" Grid.Row="3" />
                            <ComboBox x:Name="PatchModeCombobox" HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="120" Grid.Column="1" Margin="0,1,0,1" Grid.Row="3"/>
                            <CheckBox x:Name="PatchFollowPathSetting" Content="Follow Path" HorizontalAlignment="Stretch" Margin="0,2,0,0" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="4" ToolTipService.ShowOnDisabled="True"
                                  ToolTip="Follow files based on xvm configuration multiple file structure"/>
                        </Grid>
                        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,372,0,25">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <TextBlock x:Name="PatchLinesPathHeader" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Path" VerticalAlignment="Stretch"/>
                            <TextBox x:Name="PatchLinesPathTextbox" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" Grid.Row="1" />
                            <TextBlock x:Name="PatchSearchHeader" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="Search" VerticalAlignment="Stretch"  Grid.Row="2"/>
                            <TextBox x:Name="PatchSearchTextbox" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch"  Grid.Row="3" AcceptsReturn="True" AcceptsTab="True"/>
                            <TextBlock x:Name="PatchReplaceHeader" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="Replace" VerticalAlignment="Stretch" Grid.Row="4"/>
                            <CheckBox x:Name="PopOutReplaceBlockCB" Content="Pop-out replace textbox" HorizontalAlignment="Right" Margin="0,0,2,4" VerticalAlignment="Bottom" 
                                      ToolTip="Show a larger window to write the replace text field" Grid.Row="4" Click="PopOutReplaceBlockCB_Click"/>
                            <TextBox x:Name="PatchReplaceTextbox" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" Grid.Row="5" AcceptsReturn="True" AcceptsTab="True"/>
                        </Grid>
                        <Button x:Name="MoveUpPatchButton" Content="Move Up" HorizontalAlignment="Right" Margin="0,0,389,0" VerticalAlignment="Bottom" Width="60" Click="MoveUpPatchButton_Click"/>
                        <Button x:Name="MoveDownPatchButton" Content="Move Down" HorizontalAlignment="Right" Margin="0,0,308,0" VerticalAlignment="Bottom" Width="76" Click="MoveDownPatchButton_Click"/>
                        <Button x:Name="RemovePatchButton" Content="Remove" HorizontalAlignment="Right" Margin="0,0,245,0" VerticalAlignment="Bottom" Width="58" Click="RemovePatchButton_Click"/>
                        <Button x:Name="AddNewPatchButton" Content="Add new" HorizontalAlignment="Right" Margin="0,0,182,0" VerticalAlignment="Bottom" Width="58" Click="AddNewPatchButton_Click"/>
                        <Button x:Name="TestPatchButton" Content="Test Patch..." HorizontalAlignment="Right" Margin="0,0,102,0" VerticalAlignment="Bottom" Width="75" Click="TestPatchButton_Click"/>
                        <Button x:Name="ApplyPatchChangesButton" Content="Apply Changes" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="97" Click="ApplyPatchChangesButton_Click"/>
                    </Grid>
                </TabItem>
                <TabItem x:Name="AtlasesTab" Header="Atlases">
                    <Grid>
                        <!-- NEWLINE =&#10; -->
                        <ListBox x:Name="PackageAtlasesDisplay" HorizontalAlignment="Stretch" Height="63" VerticalAlignment="Top" SelectionChanged="PackageAtlasesDisplay_SelectionChanged"/>
                        <Grid HorizontalAlignment="Stretch" Height="461" Margin="0,69,0,0" VerticalAlignment="Top">
                            <Grid.RowDefinitions>
                                <!-- Pkg -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <!-- DirectoryInArchive -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <!-- AtlasFile MapFile -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="20"/>
                                <!-- PowOf2 and Square and fast image packer -->
                                <RowDefinition Height="20"/>
                                <!-- Atlas Width and Height -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="20"/>
                                <!-- AtlasSaveDirectory -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <!-- ImageFolders -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="60"/>
                                <RowDefinition Height="1*"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="2*"/>
                                <ColumnDefinition Width="2*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock x:Name="AtlasPkgLabel" Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Package location" VerticalAlignment="Bottom" ToolTip="'pkg' parameter of atlas xml"/>
                            <TextBox x:Name="AtlasPkgTextbox" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'pkg' parameter of atlas xml"/>
                            <TextBlock x:Name="AtlasDirectoryInArchiveLabel" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Directory In Archive" VerticalAlignment="Bottom" ToolTip="'DirectoryInAtchive' parameter of atlas xml"/>
                            <TextBox x:Name="AtlasDirectoryInArchiveTextbox" Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'DirectoryInAtchive' parameter of atlas xml"/>
                            <TextBlock x:Name="AtlasAtlasFileLabel" Grid.Row="4" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Atlas file in archive" VerticalAlignment="Bottom" ToolTip="'AtlasFile' parameter of atlas xml"/>
                            <TextBox x:Name="AtlasAtlasFileTextbox" Grid.Row="5" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'AtlasFile' parameter of atlas xml"/>
                            <TextBlock x:Name="AtlasMapFileLabel" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Map file in archive" VerticalAlignment="Bottom" ToolTip="'MapFile' parameter of atlas xml"/>
                            <TextBox x:Name="AtlasMapFileTextbox" Grid.Row="5" Grid.Column="1" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'MapFile' parameter of atlas xml"/>
                            <CheckBox x:Name="AtlasPowOf2Checkbox" Grid.Row="6" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" Content="Power of 2" ToolTip="'PowOf2' in xml, require the built atlas file to be a size power of 2"/>
                            <CheckBox x:Name="AtlasSquareCheckbox" Grid.Row="6" HorizontalAlignment="Left" VerticalAlignment="Center" Content="Square" ToolTip="'Square' in xml, require the built atlas file be square" Margin="80,0,0,0"/>
                            <CheckBox x:Name="AtlasFastImagePackerCheckbox" Grid.Row="6" HorizontalAlignment="Left" VerticalAlignment="Center" Content="Fast Image Packer" ToolTip="'FastImagePacker' in xml, accept the first pass of packing" Margin="140,0,0,0"/>
                            <TextBlock x:Name="AtlasPaddingLabel" Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Padding" VerticalAlignment="Center" ToolTip="'Padding' parameter of atlas xml"/>
                            <TextBox x:Name="AtlasPaddingTextbox" Grid.Row="6" Grid.Column="1" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'Padding' parameter of atlas xml" Margin="48,0,0,0"/>
                            <TextBlock x:Name="AtlasAtlasWidthLabel" Grid.Row="7" Grid.Column="0" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Atlas Width" VerticalAlignment="Bottom" ToolTip="'AtlasWidth' parameter of atlas xml"/>
                            <TextBox x:Name="AtlasAtlasWidthTextbox" Grid.Row="8" Grid.Column="0" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'AtlasHeight' parameter of atlas xml"/>
                            <TextBlock x:Name="AtlasAtlasHeightLabel" Grid.Row="7" Grid.Column="1" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Atlas Height" VerticalAlignment="Bottom" ToolTip="'AtlasWidth' parameter of atlas xml"/>
                            <TextBox x:Name="AtlasAtlasHeightTextbox" Grid.Row="8" Grid.Column="1" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'AtlasHeight' parameter of atlas xml"/>
                            <TextBlock x:Name="AtlasAtlasSaveDirectoryLabel" Grid.Row="9" Grid.ColumnSpan="2" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Atlas Save Directory" VerticalAlignment="Bottom" ToolTip="'AtlasSaveDirectory' parameter of atlas xml"/>
                            <TextBox x:Name="AtlasAtlasSaveDirectoryTextbox" Grid.Row="10" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'AtlasSaveDirectory' parameter of atlas xml"/>
                            <TextBlock x:Name="AtlasImageFoldersLabel" Grid.Row="11" Grid.ColumnSpan="2" HorizontalAlignment="Left" TextWrapping="Wrap" Text="ImageFolders" VerticalAlignment="Bottom" ToolTip="'ImageFolders' parameter of atlas xml"/>
                            <TextBox x:Name="AtlasImageFoldersTextbox" Grid.Row="12" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'ImageFolders' parameter of atlas xml, each entry seperated by newline" AcceptsReturn="True"/>
                        </Grid>
                        <Button x:Name="MoveUpAtlasButton" Content="Move Up" HorizontalAlignment="Right" Margin="0,0,309,1" VerticalAlignment="Bottom" Width="60" Click="MoveUpAtlasButton_Click"/>
                        <Button x:Name="MoveDownAtlasButton" Content="Move Down" HorizontalAlignment="Right" Margin="0,0,228,1" VerticalAlignment="Bottom" Width="76" Click="MoveDownAtlasButton_Click"/>
                        <Button x:Name="RemoveAtlasButton" Content="Remove" HorizontalAlignment="Right" Margin="0,0,165,1" VerticalAlignment="Bottom" Width="58" Click="RemoveAtlasButton_Click"/>
                        <Button x:Name="AddNewAtlasButton" Content="Add new" HorizontalAlignment="Right" Margin="0,0,102,1" VerticalAlignment="Bottom" Width="58" Click="AddNewAtlasButton_Click"/>
                        <Button x:Name="ApplyAtlasChangesButton" Margin="0,0,0,1" Content="Apply Changes" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="97" Click="ApplyAtlasChangesButton_Click"/>
                    </Grid>
                </TabItem>
                <TabItem x:Name="XmlUnpackShortcutTab" Header="XmlUnpack/Shortcut">
                    <Grid>
                        <ListBox x:Name="PackageXmlUnpackDisplay" HorizontalAlignment="Stretch" Height="63" VerticalAlignment="Top" SelectionChanged="PackageXmlUnpackDisplay_SelectionChanged"/>
                        <Grid HorizontalAlignment="Stretch" Height="281" Margin="0,68,0,0" VerticalAlignment="Top">
                            <Grid.RowDefinitions>
                                <!-- Pkg -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <!-- DirectoryInArchive -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <!-- FileName -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="20"/>
                                <!-- ExtractDirectory -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <!-- NewFilename -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="25"/>
                                <RowDefinition Height="2"/>
                            </Grid.RowDefinitions>
                            <TextBlock x:Name="XmlUnpackPkgLabel" Grid.Row="0" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Package location" VerticalAlignment="Bottom" ToolTip="'pkg' parameter of XmlUnpack xml"/>
                            <TextBox x:Name="XmlUnpackPkgTextbox" Grid.Row="1" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'pkg' parameter of XmlUnpack xml"/>
                            <TextBlock x:Name="XmlUnpackDirectoryInArchiveLabel" Grid.Row="2" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Directory In Archive" VerticalAlignment="Bottom" ToolTip="'DirectoryInArchive' parameter of XmlUnpack xml"/>
                            <TextBox x:Name="XmlUnpackDirectoryInArchiveTextbox" Grid.Row="3" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'DirectoryInArchive' parameter of XmlUnpack xml"/>
                            <TextBlock x:Name="XmlUnpackFilenameLabel" Grid.Row="4" HorizontalAlignment="Left" TextWrapping="Wrap" Text="File name" VerticalAlignment="Bottom" ToolTip="'Filename' parameter of XmlUnpack xml"/>
                            <TextBox x:Name="XmlUnpackFilenameTextbox" Grid.Row="5" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'Filename' parameter of XmlUnpack xml"/>
                            <TextBlock x:Name="XmlUnpackExtractDirectoryLabel" Grid.Row="6" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Extract Directory" VerticalAlignment="Bottom" ToolTip="'ExtractDirectory' parameter of XmlUnpack xml"/>
                            <TextBox x:Name="XmlUnpackExtractDirectoryTextbox" Grid.Row="7" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'ExtractDirectory' parameter of XmlUnpack xml"/>
                            <TextBlock x:Name="XmlUnpackNewFilenameLabel" Grid.Row="8" HorizontalAlignment="Left" TextWrapping="Wrap" Text="New Filename" VerticalAlignment="Bottom" ToolTip="'NewFilename' parameter of XmlUnpack xml"/>
                            <TextBox x:Name="XmlUnpackNewFilenameTextbox" Grid.Row="9" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'NewFilename' parameter of XmlUnpack xml" AcceptsReturn="True"/>
                            <Rectangle x:Name="XmlUnpackShortcutDivider" Grid.Row="11" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <Rectangle.Resources>
                                    <Style TargetType="Rectangle">
                                        <Setter Property="Fill" Value="Black"/>
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding DarkTheme, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:RelhaxWindow}}}" Value="True">
                                                <Setter Property="Fill" Value="White"/>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Rectangle.Resources>
                            </Rectangle>

                            <Button x:Name="MoveUpXmlUnpackButton" Grid.Row="10" Content="Move Up" HorizontalAlignment="Right" Margin="0,0,309,1" VerticalAlignment="Bottom" Width="60" Click="MoveUpXmlUnpackButton_Click"/>
                            <Button x:Name="MoveDownXmlUnpackButton" Grid.Row="10" Content="Move Down" HorizontalAlignment="Right" Margin="0,0,228,1" VerticalAlignment="Bottom" Width="76" Click="MoveDownXmlUnpackButton_Click"/>
                            <Button x:Name="RemoveXmlUnpackButton" Content="Remove" HorizontalAlignment="Right" Margin="0,0,165,1" VerticalAlignment="Bottom" Width="58" Click="RemoveXmlUnpackButton_Click" Grid.Row="10"/>
                            <Button x:Name="AddNewXmlUnpackButton" Content="Add new" HorizontalAlignment="Right" Margin="0,0,102,1" VerticalAlignment="Bottom" Width="58" Click="AddNewXmlUnpackButton_Click" Grid.Row="10"/>
                            <Button x:Name="ApplyXmlUnpackChangesButton" Content="Apply Changes" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="97" Margin="0,0,0,1" Grid.Row="10" Click="ApplyXmlUnpackChangesButton_Click"/>
                        </Grid>
                        <ListBox x:Name="PackageShortcutDisplay" HorizontalAlignment="Stretch" Height="68" VerticalAlignment="Top" Margin="0,360,0,0" SelectionChanged="PackageShortcutDisplay_SelectionChanged"/>
                        <Grid HorizontalAlignment="Stretch" Height="133" VerticalAlignment="Bottom">
                            <Grid.RowDefinitions>
                                <!-- Path -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <!-- Name -->
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="35"/>
                                <!-- Enabled -->
                                <RowDefinition Height="20"/>
                            </Grid.RowDefinitions>
                            <TextBlock x:Name="ShortcutPathLabel" Grid.Row="0" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Path" VerticalAlignment="Bottom" ToolTip="'Path' parameter of shortcut xml, the target of the shortcut"/>
                            <TextBox x:Name="ShortcutPathTextbox" Grid.Row="1" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'Path' parameter of shortcut xml, the target of the shortcut"/>
                            <TextBlock x:Name="ShortcutNameLabel" Grid.Row="2" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Shortcut name" VerticalAlignment="Bottom" ToolTip="'Name' parameter of shortcut xml, the name of the shortcut"/>
                            <TextBox x:Name="ShortcutNameTextbox" Grid.Row="3" HorizontalAlignment="Stretch" TextWrapping="Wrap" VerticalAlignment="Stretch" ToolTip="'Name' parameter of shortcut xml, the name of the shortcut"/>
                            <CheckBox x:Name="ShortcutEnabledCheckbox" Grid.Row="4" HorizontalAlignment="Left" Content="Enabled" VerticalAlignment="Bottom" ToolTip="'Enabled' parameter of shortcut xml" Margin="0,0,0,3"/>
                            <Button x:Name="MoveUpShortcutButton" Grid.Row="4" Content="Move Up" HorizontalAlignment="Right" Margin="0,1,309,1" VerticalAlignment="Bottom" Width="60" Click="MoveUpShortcutButton_Click"/>
                            <Button x:Name="MoveDownShortcutButton" Grid.Row="4" Content="Move Down" HorizontalAlignment="Right" Margin="0,1,228,1" VerticalAlignment="Bottom" Width="76" Click="MoveDownShortcutButton_Click"/>
                            <Button x:Name="RemoveShortcutButton" Grid.Row="4" Content="Remove" HorizontalAlignment="Right" Margin="0,1,165,1" VerticalAlignment="Bottom" Width="58" Click="RemoveShortcutButton_Click"/>
                            <Button x:Name="AddNewShortcutButton" Grid.Row="4" Content="Add new" HorizontalAlignment="Right" Margin="0,1,102,1" VerticalAlignment="Bottom" Width="58" Click="AddNewShortcutButton_Click"/>
                            <Button x:Name="ApplyShortcutButton" Grid.Row="4" Content="Apply Changes" HorizontalAlignment="Right" Margin="0,1,0,1" VerticalAlignment="Bottom" Width="97" Click="ApplyShortcutButton_Click"/>
                        </Grid>
                    </Grid>
                </TabItem>
            </TabControl>
            <ComboBox x:Name="SearchBox" HorizontalAlignment="Stretch" VerticalAlignment="Top" IsEditable="True" Grid.Column="2"
                      KeyUp="SearchBox_KeyUp" PreviewMouseDown="SearchBox_PreviewMouseDown" IsTextSearchEnabled="False" DropDownOpened="SearchBox_DropDownOpened"
                      Style="{DynamicResource ComboBoxStyle1}" ItemsSource="{Binding}" ItemsPanel="{StaticResource VSP}">
            </ComboBox>
        </Grid>
        <TextBlock x:Name="DragDropTest" HorizontalAlignment="Stretch" Margin="250,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Height="30"/>
    </Grid>
</local:RelhaxFeatureWindowWithChanges>
