<controls:KeyboardView x:Class="JuliusSweetland.OptiKey.UI.Views.Keyboards.Common.Diacritics2"
                       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                       xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                       xmlns:controls="clr-namespace:JuliusSweetland.OptiKey.UI.Controls"
                       xmlns:models="clr-namespace:JuliusSweetland.OptiKey.Models"
                       xmlns:enums="clr-namespace:JuliusSweetland.OptiKey.Enums"
                       mc:Ignorable="d" 
                       d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.Resources>
        <ResourceDictionary Source="/OptiKey;component/Resources/Icons/KeySymbols.xaml" />
    </UserControl.Resources>
    
    <Grid Background="{DynamicResource KeyDefaultBackgroundBrush}"
          Grid.IsSharedSizeScope="True">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <controls:Output Grid.Row="0" Grid.Column="0"
                        Grid.RowSpan="2" Grid.ColumnSpan="22" 
                        NumberOfSuggestionsDisplayed="{Binding Path=DataContext.SuggestionService.SuggestionsPerPage, RelativeSource={RelativeSource AncestorType=controls:KeyboardHost}, Mode=TwoWay}" /> <!--N.B. This MUST be TwoWay to detect changes to the DataContext used in the binding path-->
        
        <controls:Key Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
                      ShiftUpText="ị" ShiftDownText="Ị"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ị" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2"
                      ShiftUpText="į" ShiftDownText="Į"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="į" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="4" Grid.ColumnSpan="2"
                      ShiftUpText="ī" ShiftDownText="Ī"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ī" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="6" Grid.ColumnSpan="2"
                      ShiftUpText="ï" ShiftDownText="Ï"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ï" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="8" Grid.ColumnSpan="2"
                      ShiftUpText="î" ShiftDownText="Î"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="î" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="10" Grid.ColumnSpan="2"
                      ShiftUpText="í" ShiftDownText="Í"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="í" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="12" Grid.ColumnSpan="2"
                      ShiftUpText="ì" ShiftDownText="Ì"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ì" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="14" Grid.ColumnSpan="2"
                      ShiftUpText="ķ" ShiftDownText="Ķ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ķ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="16" Grid.ColumnSpan="2"
                      ShiftUpText="ł" ShiftDownText="Ł"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ł" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="18" Grid.ColumnSpan="2"
                      ShiftUpText="ľ" ShiftDownText="Ľ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ľ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="2" Grid.Column="20" Grid.ColumnSpan="2"
                      SymbolGeometry="{StaticResource 2of3Icon}"
                      Text="NEXT"
                      SharedSizeGroup="KeyWithSymbol">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="Diacritic3Keyboard" />
            </controls:Key.Value>
        </controls:Key>

        <controls:Key Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
                      ShiftUpText="ļ" ShiftDownText="Ļ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ļ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2"
                      ShiftUpText="ĺ" ShiftDownText="Ĺ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ĺ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="4" Grid.ColumnSpan="2"
                      ShiftUpText="ň" ShiftDownText="Ň"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ň" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="6" Grid.ColumnSpan="2"
                      ShiftUpText="ņ" ShiftDownText="Ņ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ņ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="8" Grid.ColumnSpan="2"
                      ShiftUpText="ń" ShiftDownText="Ń"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ń" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="10" Grid.ColumnSpan="2"
                      ShiftUpText="ñ" ShiftDownText="Ñ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ñ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="12" Grid.ColumnSpan="2"
                      ShiftUpText="ơ" ShiftDownText="Ơ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ơ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="14" Grid.ColumnSpan="2"
                      ShiftUpText="œ" ShiftDownText="Œ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="œ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="16" Grid.ColumnSpan="2"
                      ShiftUpText="ő" ShiftDownText="Ő"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ő" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="18" Grid.ColumnSpan="2"
                      ShiftUpText="ō" ShiftDownText="Ō"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ō" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="3" Grid.Column="20" Grid.ColumnSpan="2"
                      SymbolGeometry="{StaticResource MenuIcon}"
                      Text="MENU"
                      SharedSizeGroup="KeyWithSymbol">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="{x:Static enums:FunctionKeys.MenuKeyboard}" />
            </controls:Key.Value>
        </controls:Key>

        <controls:Key Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2"
                      SymbolGeometry="{StaticResource ShiftIcon}"
                      Text="SHIFT"
                      SharedSizeGroup="KeyWithSymbol">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="{x:Static enums:FunctionKeys.LeftShift}" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2"
                      ShiftUpText="ø" ShiftDownText="Ø"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ø" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="4" Grid.ColumnSpan="2"
                      ShiftUpText="ö" ShiftDownText="Ö"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ö" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="6" Grid.ColumnSpan="2"
                      ShiftUpText="õ" ShiftDownText="Õ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="õ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="8" Grid.ColumnSpan="2"
                      ShiftUpText="ô" ShiftDownText="Ô"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ô" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="10" Grid.ColumnSpan="2"
                      ShiftUpText="ó" ShiftDownText="Ó"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ó" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="12" Grid.ColumnSpan="2"
                      ShiftUpText="ò" ShiftDownText="Ò"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ò" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="14" Grid.ColumnSpan="2"
                      ShiftUpText="ŕ" ShiftDownText="Ŕ"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ŕ" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="16" Grid.ColumnSpan="2"
                      SymbolGeometry="{StaticResource BackOneIcon}"
                      Text="BACK&#x0a;ONE"
                      SharedSizeGroup="KeyWithSymbol">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="{x:Static enums:FunctionKeys.BackOne}" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="18" Grid.ColumnSpan="2"
                      SymbolGeometry="{StaticResource BackManyIcon}"
                      Text="BACK&#x0a;WORD"
                      SharedSizeGroup="KeyWithSymbol">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="{x:Static enums:FunctionKeys.BackMany}" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="4" Grid.Column="20" Grid.ColumnSpan="2"
                      SymbolGeometry="{StaticResource AlphaIcon}"
                      Text="LETTERS"
                      SharedSizeGroup="KeyWithSymbol">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="{x:Static enums:FunctionKeys.AlphaKeyboard}" />
            </controls:Key.Value>
        </controls:Key>

        <controls:Key Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2"
                      Text="CTRL"
                      SharedSizeGroup="KeyWithDescription">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="{x:Static enums:FunctionKeys.LeftCtrl}" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2"
                      SymbolGeometry="{StaticResource WinIcon}"
                      Text="WIN"
                      SharedSizeGroup="KeyWithSymbol">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="{x:Static enums:FunctionKeys.LeftWin}" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="2"
                      Text="ALT"
                      SharedSizeGroup="KeyWithDescription">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="{x:Static enums:FunctionKeys.LeftAlt}" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="5" Grid.Column="6" Grid.ColumnSpan="2"
                      ShiftUpText="ř" ShiftDownText="Ř"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ř" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="5" Grid.Column="8" Grid.ColumnSpan="4"
                      SymbolGeometry="{StaticResource SpaceIcon}"
                      Text="SPACE"
                      WidthSpan="2" 
                      SharedSizeGroup="KeyWithSymbol">
            <controls:Key.Value>
                <models:KeyValue String=" " />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="5" Grid.Column="12" Grid.ColumnSpan="2"
                      ShiftUpText="ş" ShiftDownText="Ş"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="ş" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="5" Grid.Column="14" Grid.ColumnSpan="2"
                      ShiftUpText="š" ShiftDownText="Š"
                      SharedSizeGroup="KeyWithSingleLetter">
            <controls:Key.Value>
                <models:KeyValue String="š" />
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="5" Grid.Column="16" Grid.ColumnSpan="4"
                      SymbolGeometry="{StaticResource EnterIcon}"
                      Text="ENTER"
                      SharedSizeGroup="KeyWithSymbol"
                      WidthSpan="2">
            <controls:Key.Value>
                <models:KeyValue String="&#x0a;" /> <!--Hex for "\n"-->
            </controls:Key.Value>
        </controls:Key>
        <controls:Key Grid.Row="5" Grid.Column="20" Grid.ColumnSpan="2"
                      SymbolGeometry="{StaticResource SleepIcon}"
                      Text="SLEEP"
                      SharedSizeGroup="KeyWithSymbol">
            <controls:Key.Value>
                <models:KeyValue FunctionKey="{x:Static enums:FunctionKeys.Sleep}" />
            </controls:Key.Value>
        </controls:Key>
    </Grid>
</controls:KeyboardView>
