<my:MyUserControl x:Class="WpfClient.ItsdbWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:my="clr-namespace:WpfClient"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             x:Name="itsdb_uc"
             d:DesignHeight="300" d:DesignWidth="300" 
             DataContext="{Binding RelativeSource={RelativeSource Self}, Path=ItsdbDatabase}" 
             SnapsToDevicePixels="True">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <Label Content="{Binding Path=SourceDirectory}" Margin="8" />
            <ComboBox ItemsSource="{Binding Path=Tables}" 
                      SelectedItem="{Binding ElementName=itsdb_uc, Path=ItsdbSelectedTable}"
                      Name="table_select" 
                      Margin="8" MinWidth="150"
                      >
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                            <TextBlock>
                                <Run Text="{Binding Path=SysObjName, Mode=OneTime}" /> (<Run Text="{Binding Path=Count, Mode=OneTime}" />)
                            </TextBlock>
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
        </StackPanel>
        <DataGrid Grid.Row="1" ItemsSource="{Binding ElementName=table_select, Path=SelectedItem}" >
            
        </DataGrid>
            
    </Grid>
</my:MyUserControl>