<UserControl
    x:Class="Sonex.Client.Controls.TextProperty"
    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}" />

        <TextBox
            Grid.Column="1"
            Text="{Binding Value, ElementName=Root, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
            PlaceholderText="{Binding PlaceholderText, ElementName=Root}"
            IsReadOnly="{Binding IsReadOnly, ElementName=Root}"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Center"
            MinHeight="28"
            Height="28"
            Padding="8,6,8,4"
            FontSize="12"
            CornerRadius="4" />
    </Grid>
</UserControl>
