<Window x:Class="FLY.UI.OSK.Window_FullPad"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        WindowStyle="None" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
        Title="Window_FullPad" Height="400" Width="800" Background="#525a65" Loaded="Window_Loaded">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="MaterialDesignIcons.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.Resources>
            <SolidColorBrush x:Key="Color_light" Color="#f4f4f4"/>
            <SolidColorBrush x:Key="Color_dark" Color="#8e9aa8"/>
            <Style TargetType="TextBlock" x:Key="TextBlockStyle_abc">
                <Setter Property="Foreground"  Value="#444e57" />
                <Setter Property="FontSize"  Value="20" />
                <Setter Property="FontFamily"  Value="Microsoft Sans Serif" />
                <Setter Property="TextAlignment"  Value="Left" />
            </Style>
            <Style TargetType="Button" x:Key="ButtonStyle_key">
                <Setter Property="Margin" Value="3"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <StackPanel Orientation="Vertical">
                                <Border Background="{TemplateBinding Background}" Height="{TemplateBinding ActualHeight}" Width="{TemplateBinding ActualWidth}" BorderThickness="2" CornerRadius="3">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="50*"/>
                                            <RowDefinition Height="150*"/>
                                            <RowDefinition Height="50*"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="50*"/>
                                            <ColumnDefinition Width="150*"/>
                                            <ColumnDefinition Width="50*"/>
                                        </Grid.ColumnDefinitions>
                                        <Viewbox Grid.Row="1" Grid.Column="1" >
                                        <ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                        </Viewbox>
                                        </Grid>
                                    
                                </Border>
                            </StackPanel>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsKeyboardFocused" Value="true">
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="false">
                                </Trigger>
                                <Trigger Property="IsPressed" Value="true">
                                    <Setter Property="Opacity" Value="0.5"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style TargetType="Button" x:Key="ButtonStyle_abc" BasedOn="{StaticResource ButtonStyle_key}">
                <Setter Property="Background" Value="{StaticResource Color_light}"/>
            </Style>
            <Style TargetType="Button" x:Key="ButtonStyle_opt" BasedOn="{StaticResource ButtonStyle_key}">
                <Setter Property="Background" Value="{StaticResource Color_dark}"/>
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="57*" />
            <RowDefinition Height="200*" />
        </Grid.RowDefinitions>
        <Border Background="White" Margin="6" CornerRadius="3" MouseDown="Border_MouseDown">
            <Viewbox Margin="3" HorizontalAlignment="Right" VerticalAlignment="Center" >
                <TextBlock x:Name="textblock_result" Text="{Binding Result}" Foreground="Black" FontWeight="Bold" FontSize="30" />
            </Viewbox>
        </Border>
        <Grid Grid.Row="1" Margin="3">
            <Grid.RowDefinitions>
                <RowDefinition Height="50*" />
                <RowDefinition Height="50*" />
                <RowDefinition Height="50*" />
                <RowDefinition Height="50*" />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  />
                    <ColumnDefinition  />
                    <ColumnDefinition  />
                    <ColumnDefinition  />
                    <ColumnDefinition  />
                    <ColumnDefinition  />
                    <ColumnDefinition  />
                    <ColumnDefinition  />
                    <ColumnDefinition  />
                    <ColumnDefinition  />
                </Grid.ColumnDefinitions>
                <Button Grid.Column="0" Name="button_q" Style="{StaticResource ButtonStyle_abc}" Click="button_q_Click">
                    <TextBlock Text="{Binding KeyQ}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="1" Name="button_w" Style="{StaticResource ButtonStyle_abc}" Click="button_w_Click">
                    <TextBlock Text="{Binding KeyW}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="2" Name="button_e" Style="{StaticResource ButtonStyle_abc}" Click="button_e_Click">
                    <TextBlock Text="{Binding KeyE}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="3" Name="button_r" Style="{StaticResource ButtonStyle_abc}" Click="button_r_Click">
                    <TextBlock Text="{Binding KeyR}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="4" Name="button_t" Style="{StaticResource ButtonStyle_abc}" Click="button_t_Click">
                    <TextBlock Text="{Binding KeyT}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="5" Name="button_y" Style="{StaticResource ButtonStyle_abc}" Click="button_y_Click">
                    <TextBlock Text="{Binding KeyY}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="6" Name="button_u" Style="{StaticResource ButtonStyle_abc}" Click="button_u_Click">
                    <TextBlock Text="{Binding KeyU}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="7" Name="button_i" Style="{StaticResource ButtonStyle_abc}" Click="button_i_Click">
                    <TextBlock Text="{Binding KeyI}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="8" Name="button_o" Style="{StaticResource ButtonStyle_abc}" Click="button_o_Click">
                    <TextBlock Text="{Binding KeyO}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="9" Name="button_p" Style="{StaticResource ButtonStyle_abc}" Click="button_p_Click">
                    <TextBlock Text="{Binding KeyP}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
            </Grid>
            <Grid Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="50*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="50*"/>

                </Grid.ColumnDefinitions>
                <Button Grid.Column="1" Name="button_a" Style="{StaticResource ButtonStyle_abc}" Click="button_a_Click">
                    <TextBlock Text="{Binding KeyA}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="2" Name="button_s" Style="{StaticResource ButtonStyle_abc}" Click="button_s_Click">
                    <TextBlock Text="{Binding KeyS}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="3" Name="button_d" Style="{StaticResource ButtonStyle_abc}" Click="button_d_Click">
                    <TextBlock Text="{Binding KeyD}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="4" Name="button_f" Style="{StaticResource ButtonStyle_abc}" Click="button_f_Click">
                    <TextBlock Text="{Binding KeyF}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="5" Name="button_g" Style="{StaticResource ButtonStyle_abc}" Click="button_g_Click">
                    <TextBlock Text="{Binding KeyG}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="6" Name="button_h" Style="{StaticResource ButtonStyle_abc}" Click="button_h_Click">
                    <TextBlock Text="{Binding KeyH}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="7" Name="button_j" Style="{StaticResource ButtonStyle_abc}" Click="button_j_Click">
                    <TextBlock Text="{Binding KeyJ}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="8" Name="button_k" Style="{StaticResource ButtonStyle_abc}" Click="button_k_Click">
                    <TextBlock Text="{Binding KeyK}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="9" Name="button_l" Style="{StaticResource ButtonStyle_abc}" Click="button_l_Click">
                    <TextBlock Text="{Binding KeyL}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
            </Grid>
            <Grid Grid.Row="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="200*"/>

                </Grid.ColumnDefinitions>
                <Button Grid.Column="0" Name="button_caps" Style="{StaticResource ButtonStyle_opt}" Click="button_caps_Click">
                    <Path Style="{StaticResource PathStyle_keyboard-caps}" Fill="{StaticResource Color_light}" />
                </Button>
                <Button Grid.Column="1" Name="button_z" Style="{StaticResource ButtonStyle_abc}" Click="button_z_Click">
                    <TextBlock Text="{Binding KeyZ}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="2" Name="button_x" Style="{StaticResource ButtonStyle_abc}" Click="button_x_Click">
                    <TextBlock Text="{Binding KeyX}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="3" Name="button_c" Style="{StaticResource ButtonStyle_abc}" Click="button_c_Click">
                    <TextBlock Text="{Binding KeyC}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="4" Name="button_v" Style="{StaticResource ButtonStyle_abc}" Click="button_v_Click">
                    <TextBlock Text="{Binding KeyV}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="5" Name="button_b" Style="{StaticResource ButtonStyle_abc}" Click="button_b_Click">
                    <TextBlock Text="{Binding KeyB}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="6" Name="button_n" Style="{StaticResource ButtonStyle_abc}" Click="button_n_Click">
                    <TextBlock Text="{Binding KeyN}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="7" Name="button_m" Style="{StaticResource ButtonStyle_abc}" Click="button_m_Click">
                    <TextBlock Text="{Binding KeyM}" Style="{StaticResource TextBlockStyle_abc}" />
                </Button>
                <Button Grid.Column="8" Name="button_backspace" Style="{StaticResource ButtonStyle_opt}" Click="button_backspace_Click">
                    <Path Style="{StaticResource PathStyle_backspace}" Fill="{StaticResource Color_light}" />
                </Button>
            </Grid>
            <Grid Grid.Row="3">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="250*"/>
                    <ColumnDefinition  Width="100*"/>
                    <ColumnDefinition  Width="400*"/>
                    <ColumnDefinition  Width="250*"/>
                </Grid.ColumnDefinitions>
                <Button Grid.Column="0" Name="button_close" Style="{StaticResource ButtonStyle_opt}" Click="button_close_Click">

                    <Path Style="{StaticResource PathStyle_window-close}" Fill="{StaticResource Color_light}" />

                </Button>
                <Button Grid.Column="1" Name="button_123" Style="{StaticResource ButtonStyle_opt}" Click="button_123_Click">

                    <Path Style="{StaticResource PathStyle_numeric}" Fill="{StaticResource Color_light}" />

                </Button>
                <Button Grid.Column="2" Name="button_space" Style="{StaticResource ButtonStyle_abc}" Click="button_space_Click" />
                <Button Grid.Column="4" Name="button_enter" Style="{StaticResource ButtonStyle_opt}" Click="button_enter_Click">

                    <Path Style="{StaticResource PathStyle_keyboard-return}" Fill="{StaticResource Color_light}" />

                </Button>
            </Grid>
        </Grid>
        
    </Grid>
</Window>
