<UserControl
    x:Class="Sonex.Client.Controls.JsonProperty"
    x:Name="Root"
    Width="400"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Grid ColumnSpacing="10" MinHeight="30">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="{Binding HeaderWidth, ElementName=Root}" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <TextBlock
            Text="{Binding Header, ElementName=Root}"
            VerticalAlignment="Center"
            FontSize="12"
            Foreground="{ThemeResource TextFillColorSecondaryBrush}" />

        <RichEditBox
            x:Name="Editor"
            Grid.Column="1"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Center"
            MinHeight="28"
            Height="{Binding EditorHeight, ElementName=Root}"
            Padding="8,6,8,4"
            FontFamily="Consolas"
            FontSize="12"
            TextWrapping="{Binding TextWrapping, ElementName=Root}"
            ScrollViewer.HorizontalScrollBarVisibility="{Binding HorizontalScrollBarVisibility, ElementName=Root}"
            ScrollViewer.VerticalScrollBarVisibility="{Binding VerticalScrollBarVisibility, ElementName=Root}"
            IsSpellCheckEnabled="False" />
    </Grid>
</UserControl>
