<Window x:Class="Elwig.Windows.QueryWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Elwig.Windows"
        Title="Datenbankabfragen - Elwig" Height="450" Width="800" MinWidth="400" MinHeight="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="5"/>
            <RowDefinition Height="1*" MinHeight="50"/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="1*" MinHeight="50"/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="6*" MinHeight="100"/>
        </Grid.RowDefinitions>

        <TextBox x:Name="QueryInput" Text="SELECT * FROM v_member" Grid.Row="1" Grid.RowSpan="3"
                 AcceptsReturn="True" VerticalScrollBarVisibility="Visible" TextWrapping="Wrap"
                 HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,5,120,5"
                 FontFamily="Cascadia Code Light" FontSize="13">
            <TextBox.InputBindings>
                <KeyBinding Key="Return" Modifiers="Control" Command="{Binding EnterCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:QueryWindow}}}" />
                <KeyBinding Key="S" Modifiers="Control" Command="{Binding SaveCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:QueryWindow}}}" />
            </TextBox.InputBindings>
        </TextBox>
        <Button x:Name="QueryButton" Content="Abfragen" Grid.Row="1"
                HorizontalAlignment="Right" VerticalAlignment="Stretch" Margin="10,5,10,0"
                Click="QueryButton_Click" Width="100"
                FontSize="14"/>
        <Button x:Name="SaveButton" Content="Speichern" Grid.Row="3"
                HorizontalAlignment="Right" VerticalAlignment="Stretch" Margin="10,0,10,5"
                Click="SaveButton_Click" Width="100"
                FontSize="14"/>

        <GridSplitter Grid.Row="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

        <DataGrid x:Name="DataList" Grid.Row="5"
                  AutoGenerateColumns="False" HeadersVisibility="Column" IsReadOnly="True" GridLinesVisibility="None" SelectionMode="Extended"
                  CanUserDeleteRows="False" CanUserResizeRows="False" CanUserAddRows="False"
                  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,5,10,10"/>
    </Grid>
</Window>
