<UserControl x:Class="NSwagStudio.Views.SwaggerGenerators.JsonSchemaInputView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:controls="clr-namespace:NSwagStudio.Controls"
             xmlns:codeGeneration="clr-namespace:NSwag.Commands.CodeGeneration;assembly=NSwag.Commands"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <Grid Margin="8" d:DataContext="{d:DesignInstance codeGeneration:JsonSchemaToSwaggerCommand}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel>
            <TextBlock Text="Schema name to use as key in 'definitions'" FontWeight="Bold" Margin="0,0,0,6" />
            <TextBox Text="{Binding Name, Mode=TwoWay}" Margin="0,0,0,12" />

            <TextBlock Text="JSON Schema: " FontWeight="Bold" Margin="0,0,0,8" />
        </StackPanel>

        <Border Grid.Row="1" Margin="-8,0,-8,-8" BorderThickness="0,1,0,0" BorderBrush="LightGray">
            <avalonedit:TextEditor x:Name="JsonSchema" Padding="8" FontFamily="Consolas" Background="GhostWhite" ShowLineNumbers="True"
                                   SyntaxHighlighting="JavaScript" FontSize="10pt">
                <i:Interaction.Behaviors>
                    <controls:AvalonEditBehavior Text="{Binding Schema, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                </i:Interaction.Behaviors>
            </avalonedit:TextEditor>
        </Border>
    </Grid>
</UserControl>
