<mahapp:MetroWindow
    Name="window"
        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:mahapp="http://metro.mahapps.com/winfx/xaml/controls"
         xmlns:Dialog="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"
        xmlns:local="clr-namespace:ModelGen.Views.Windows"
        xmlns:ViewModels="clr-namespace:ModelGen.ViewModels"
    xmlns:avalon="http://icsharpcode.net/sharpdevelop/avalonedit" x:Class="ModelGen.Views.Windows.SelectToEntity"
        Dialog:DialogParticipation.Register="{Binding}"
        mc:Ignorable="d"
        Title="SelectToEntity" Height="450" Width="800">
    <mahapp:MetroWindow.DataContext>
        <ViewModels:SelectToEntityVM/>
    </mahapp:MetroWindow.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Grid>
            <DockPanel Height="30" Margin="5">
                <ComboBox Height="25" Margin="0 0 5 0" DisplayMemberPath="Name" ItemsSource="{Binding ConnTypes}" SelectedValuePath="ConnType" SelectedValue="{Binding Type}"  Width="200"/>
                <TextBox Height="25" Text="{Binding ConnString}" VerticalContentAlignment="Center"  mahapp:TextBoxHelper.Watermark="Connection string"/>
            </DockPanel>
        </Grid>
        <Grid Grid.Row="1">
            <avalon:TextEditor Margin="5"  Document="{Binding Document}" Name="HLeditor" WordWrap="False" IsModified="False" LineNumbersForeground="{DynamicResource Foreground}" VerticalScrollBarVisibility="Auto"  ShowLineNumbers="True" FontSize="12pt" Background="{DynamicResource Background}" Foreground="{DynamicResource Foreground}"  />
        </Grid>
        <Grid Grid.Row="2">
            <StackPanel HorizontalAlignment="Right" Margin="5" Orientation="Horizontal">
                <Button Height="30" Width="150" VerticalAlignment="Top" Command="{Binding CreateCommand}" CommandParameter="{Binding ElementName=window}" Content="Create"/>
                <Button Height="30" Width="150" Margin="5 0 0 0" Click="CloseButton_Click" Content="Cancel"/>
            </StackPanel>
        </Grid>
    </Grid>
</mahapp:MetroWindow>
