<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="C1_Demo.DemoComboBoxCustom" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:C1_Demo" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:demo="clr-namespace:C1_Demo">
    <UserControl.Resources>
        <!-- Converter -->
        <demo:CountryConverter x:Key="CountryConverter" />
    </UserControl.Resources>
    
    <StackPanel VerticalAlignment="Center">

        <!-- Country -->
        <StackPanel HorizontalAlignment="Center" Margin="20">
            <TextBlock Text="Pick a Country:" Margin="0 0 0 5" />
            <c1:C1ComboBox x:Name="comboCountries" SelectedIndex="0" Width="200" Height="24" Padding="0" ItemConverter="{StaticResource CountryConverter}">
                <c1:C1ComboBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Height="24">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="30" />
                                <ColumnDefinition Width="5" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Image Grid.Column="0" Margin="2 1 2 1" Source="{Binding Flag}" />
                            <TextBlock Grid.Column="2" Foreground="Black" Text="{Binding Name}" VerticalAlignment="Center" />
                        </Grid>
                    </DataTemplate>
                </c1:C1ComboBox.ItemTemplate>
            </c1:C1ComboBox>
        </StackPanel>

        <!-- Font Family -->
        <StackPanel HorizontalAlignment="Center" Margin="20">
            <TextBlock Text="Pick a Font:" Margin="0 0 0 5" />
            <c1:C1ComboBox x:Name="comboFontFamilies" SelectedIndex="0" Width="200" Height="24" Padding="0">
                <c1:C1ComboBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Height="24">
                            <Grid.Resources>
                                <local:FontFamilyConverter x:Key="converter" />
                            </Grid.Resources>
                            <TextBlock Text="{Binding Converter={StaticResource converter}}" FontFamily="{Binding}" VerticalAlignment="Center" Margin="2" />
                        </Grid>
                    </DataTemplate>
                </c1:C1ComboBox.ItemTemplate>
            </c1:C1ComboBox>
        </StackPanel>

        <!-- Id / Value -->
        <StackPanel HorizontalAlignment="Center" Margin="20">
            <TextBlock Text="Id and Value combo:" Margin="0 0 0 5" />
            <c1:C1ComboBox x:Name="comboCustomers" Width="200" SelectedValuePath="Id" DisplayMemberPath="Name" />
        </StackPanel>

    </StackPanel>
</UserControl>