<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="SpellCheckerSample.MultiLanguage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sample="clr-namespace:SpellCheckerSample">
    <UserControl.Resources>
        <DataTemplate x:Key="DictionaryTemplate">
            <Grid Margin="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="24" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Image Source="{Binding FlagUri}" Margin="3" Grid.Column="0" />
                <TextBlock Text="{Binding Name}" Margin="3 0 0 0" Grid.Column="1" />
            </Grid>
        </DataTemplate>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Border Grid.Row="0" Margin="0 0 0 10">
            <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
                <TextBlock Text="Pick a Language:" VerticalAlignment="Center" Margin="0 0 2 0" />
                <ComboBox x:Name="cmbLanguage" Width="180" Margin="0 0 10 0" />
                <Button Content="Check Spelling" Click="Button_Click" Width="140" />
            </StackPanel>
        </Border>
        
        <sample:TextBoxHideSelection x:Name="_plainTextBox" Grid.Row="1" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" />
        
        <TextBlock x:Name="_outputTextBox" Grid.Row="2" Margin="0 10" />
    </Grid>
</UserControl>