<UserControl xmlns="https://github.com/avaloniaui"
             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:gb="using:SqlDynamiteX.UserControls"
             xmlns:vm="clr-namespace:SqlDynamiteX.ViewModels"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="SqlDynamiteX.Views.MainView"
             x:DataType="vm:MainViewModel">
	<Design.DataContext>
		<!-- This only sets the DataContext for the previewer in an IDE,
         to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
		<vm:MainViewModel />
	</Design.DataContext>

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />

			<RowDefinition Height="*" />

			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="2*" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<DockPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Stretch" LastChildFill="True">
			<Label Content="Find:" Margin="2" DockPanel.Dock="Left" />

			<Button Margin="2" DockPanel.Dock="Right" Content="About" TabIndex="7"/>
			<Button Margin="2" DockPanel.Dock="Right" Content="Save List" TabIndex="6"/>
			<Button Margin="2" DockPanel.Dock="Right" Content="DB Info" TabIndex="5"/>
			<Button x:Name="btn_Stop" Content="Stop"   Margin="2" DockPanel.Dock="Right" IsEnabled="False" TabIndex="2"/>
			<Button x:Name="btn_Search" Content="Search" Margin="2"  DockPanel.Dock="Right" TabIndex="1"/>
			<ComboBox x:Name="Search" HorizontalAlignment="Stretch" Margin="2" IsTextSearchEnabled="False" TabIndex="0"/>
		</DockPanel>

		<DockPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" LastChildFill="True">
			<Button Margin="2" Content="Manage" DockPanel.Dock="Right" TabIndex="9"/>

			<Label Margin="2" Content="Search in DB:" />
			<ComboBox Margin="2" x:Name="Connections" TabIndex="8"/>
		</DockPanel>

		<Expander Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Header="Search options" VerticalAlignment="Top" ExpandDirection="Down">
			<StackPanel Orientation="Horizontal">
				<gb:GroupBox Margin="0" HorizontalAlignment="Stretch" >
					<StackPanel VerticalAlignment="Top" HorizontalAlignment="Left" Orientation="Horizontal">
						<StackPanel>
							<CheckBox Margin="2" x:Name="FN_Check" IsChecked="True" Content="Functions" />
							<CheckBox Margin="2" x:Name="SP_Check" IsChecked="True" Content="Stored procedures" />
							<CheckBox Margin="2" x:Name="TR_Check" IsChecked="True" Content="Triggers" />
							<CheckBox Margin="2" x:Name="Table_Check" IsChecked="True" Content="Tables" />
							<CheckBox Margin="2" x:Name="Package_Check" IsChecked="True" Content="Packages" />
							<CheckBox Margin="2" x:Name="Type_Check" IsChecked="True" Content="Types" />
							<CheckBox Margin="2" x:Name="Job_Check" IsChecked="True" Content="Jobs" />
							<CheckBox Margin="2" x:Name="Service_Broker_Check" IsChecked="True" Content="Service Broker" />
						</StackPanel>
						<StackPanel>
							<CheckBox Margin="2" x:Name="View_Check" IsChecked="True" Content="Views" />
							<CheckBox Margin="2" x:Name="FK_Check" IsChecked="True" Content="Foreign keys" />
							<CheckBox Margin="2" x:Name="PK_Check" IsChecked="True" Content="Primary keys" />
							<CheckBox Margin="2" x:Name="IX_Check" IsChecked="True" Content="Indexes" />
							<CheckBox Margin="2" x:Name="Sequence_Check" IsChecked="True" Content="Sequences" />
							<CheckBox Margin="2" x:Name="Synonym_Check" IsChecked="True" Content="Synonyms" />
							<CheckBox Margin="2" x:Name="Report_Check" IsChecked="True" Content="Reports" />
							<CheckBox Margin="2" x:Name="Computed_Column_Check" IsChecked="True" Content="Computed Columns" />
						</StackPanel>
						<StackPanel>
							<Button Margin="2" Content="Select all" />
							<Button Margin="2" Content="Deselect all" />
						</StackPanel>
					</StackPanel>
				</gb:GroupBox>
				<StackPanel>
					<gb:GroupBox HorizontalAlignment="Left"  VerticalAlignment="Top">
						<StackPanel  VerticalAlignment="Top" HorizontalAlignment="Left" Orientation="Horizontal">
							<CheckBox Margin="4" x:Name="search_in_names" IsChecked="True" Content="Name"/>
							<CheckBox Margin="4" x:Name="search_in_def" IsChecked="True" Content="Body"/>
							<CheckBox Margin="4" x:Name="search_in_all_databases" IsChecked="False" Content="All Databases"/>
						</StackPanel>
					</gb:GroupBox>
					<gb:GroupBox HorizontalAlignment="Left"  VerticalAlignment="Top">
						<StackPanel Orientation="Horizontal">
							<CheckBox Margin="4" x:Name="syntax_highlighting" Content="Syntax highlighting" IsChecked="True"/>
							<CheckBox Margin="4" Height="16" Width="100">Word wrap</CheckBox>
							<CheckBox Margin="4" Height="16" x:Name="match_case" Width="100">Match case</CheckBox>
						</StackPanel>
					</gb:GroupBox>
				</StackPanel>
			</StackPanel>
		</Expander>

		<gb:GroupBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="1*" MinWidth="100" MaxWidth="480"/>
					<ColumnDefinition Width="Auto" />
					<ColumnDefinition Width="2*" />
				</Grid.ColumnDefinitions>
				<!--<ListView Grid.Column="0" Margin="2" x:Name="list1"
                         SelectionChanged="list1_SelectionChanged"
                         VerticalAlignment="Stretch"
                         HorizontalAlignment="Stretch"/>-->
				<GridSplitter HorizontalAlignment="Right"
                  VerticalAlignment="Stretch"
                  Grid.Column="1" ResizeBehavior="PreviousAndNext"
                  Width="5" Background="#FFBCBCBC"/>
				<gb:GroupBox Grid.Column="2" Margin="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderThickness="0" Opacity="1">
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="*" />

							<RowDefinition Height="Auto" />
						</Grid.RowDefinitions>
						<!--<WindowsFormsHost HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
							<sqlDynamite:SyntaxHighlightingTextBox x:Name="box1" />
						</WindowsFormsHost>-->
					</Grid>
				</gb:GroupBox>
			</Grid>
		</gb:GroupBox>

		<!--<StatusBar Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" >
			<StatusBarItem>Search result:</StatusBarItem>
			<StatusBarItem Padding="0">
				<Label x:Name="Msg" Margin="0" Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></Label>
			</StatusBarItem>
			<Separator/>
			<StatusBarItem>
				<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0">
					<ProgressBar x:Name="progressBar1" Value="35" Height="18" Width="100"></ProgressBar>
				</DockPanel>
			</StatusBarItem>
		</StatusBar>-->

	</Grid>

</UserControl>
