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

        <ComboBox
            Grid.Column="1"
            ItemsSource="{Binding ItemsSource, ElementName=Root}"
            SelectedItem="{Binding SelectedItem, ElementName=Root, Mode=TwoWay}"
            SelectedValue="{Binding SelectedValue, ElementName=Root, Mode=TwoWay}"
            SelectedValuePath="{Binding SelectedValuePath, ElementName=Root}"
            DisplayMemberPath="{Binding DisplayMemberPath, ElementName=Root}"
            PlaceholderText="{Binding PlaceholderText, ElementName=Root}"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Center"
            MinHeight="28"
            Height="28"
            Padding="8,2,8,4"
            FontSize="12" />
    </Grid>
</UserControl>
