<UserControl
    x:Class="BarCodeSamples.EncodingFormat"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BarCodeSamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c1="using:C1.Xaml"
    mc:Ignorable="d"> 
    <Grid>
        <Grid.Resources>
            <Style TargetType="c1:C1ListBox">
                <Setter Property="ItemTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Image Source="{Binding Key}" Width="64" Height="64" />
                                <TextBlock Text="{Binding Value}" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="1" Margin="2,6"/>
                            </Grid>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <c1:C1ListBox x:Name="barCodeTypes" 
                 ItemsSource="{Binding}" 
                 SelectionChanged="barCodeTypes_SelectionChanged"
                 SelectionMode="Single" Width="110">
        </c1:C1ListBox>
        <c1:C1ListBox x:Name="categories" Width="110" 
                ItemsSource="{Binding}" 
                SelectionChanged="encodingTypes_SelectionChanged"
                SelectionMode="Single"
                Grid.Column="1">
        </c1:C1ListBox>             
    </Grid>
</UserControl>
