| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 | <Window x:Class="MECF.Framework.UI.Client.CenterViews.Dialogs.FullKeyboard"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"        xmlns:local="clr-namespace:MECF.Framework.UI.Client.CenterViews.Dialogs"        mc:Ignorable="d"        Title="FullKeyboard" x:Name="fullKeyboard" AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize" Background="#7F6F6F6F"  Height="270" Width="630" WindowStartupLocation="CenterScreen">    <Window.Resources>        <Style x:Key="btnNum" TargetType="{x:Type Button}">            <!--<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>-->            <!--<Setter Property="Background">                <Setter.Value>                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">                        <GradientStop Color="#F3F3F3" Offset="0"/>                        <GradientStop Color="#EBEBEB" Offset="0.5"/>                        <GradientStop Color="#DDDDDD" Offset="0.5"/>                        <GradientStop Color="#CDCDCD" Offset="1"/>                    </LinearGradientBrush>                </Setter.Value>            </Setter>-->            <!--<Setter Property="BorderBrush" Value="#FF707070"/>-->            <!--<Setter Property="BorderThickness" Value="1"/>-->            <!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>-->            <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>            <Setter Property="Stylus.IsTouchFeedbackEnabled" Value="False"/>            <Setter Property="HorizontalContentAlignment" Value="Center"/>            <Setter Property="VerticalContentAlignment" Value="Center"/>            <EventSetter Event="PreviewMouseLeftButtonDown" Handler="Button_MouseLeftButtonDown"/>            <EventSetter Event="PreviewTouchDown" Handler="Button_PreviewTouchDown"/>            <!--<Setter Property="Height" Value="64" />            <Setter Property="Width" Value="104" />-->            <!--<Setter Property="Padding" Value="10"/>-->            <Setter Property="Template">                <Setter.Value>                    <ControlTemplate TargetType="{x:Type Button}">                        <Border x:Name="border" BorderBrush="#FF474747" BorderThickness="1" CornerRadius="6">                            <!--<Border.Effect>                                <DropShadowEffect BlurRadius="1" ShadowDepth="1" Opacity="0.27"/>                            </Border.Effect>-->                            <Border.Background>                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">                                    <GradientStop Color="#FFCCCCCC"/>                                    <GradientStop Color="WhiteSmoke" Offset="1"/>                                </LinearGradientBrush>                            </Border.Background>                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" TextElement.Foreground="#FF565656"  TextElement.FontSize="14" />                            <!--<TextBlock TextWrapping="Wrap" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="21.333" Foreground="#FF565656"/>-->                        </Border>                        <ControlTemplate.Triggers>                            <Trigger Property="IsPressed" Value="True">                                <Setter Property="Background" TargetName="border">                                    <Setter.Value>                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">                                            <GradientStop Color="#FFFF7500"/>                                            <GradientStop Color="#FFFFC547" Offset="1"/>                                        </LinearGradientBrush>                                    </Setter.Value>                                </Setter>                            </Trigger>                        </ControlTemplate.Triggers>                    </ControlTemplate>                </Setter.Value>            </Setter>        </Style>        <Style x:Key="btnFunc" TargetType="{x:Type Button}">            <!--<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>            <Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>            <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>            <Setter Property="BorderThickness" Value="1"/>            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>-->            <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>            <Setter Property="Stylus.IsTouchFeedbackEnabled" Value="False"/>            <Setter Property="FontSize" Value="10"/>            <Setter Property="HorizontalContentAlignment" Value="Center"/>            <Setter Property="VerticalContentAlignment" Value="Center"/>            <EventSetter Event="PreviewMouseLeftButtonDown" Handler="Button_MouseLeftButtonDown"/>            <!--<EventSetter Event="PreviewMouseLeftButtonUp" Handler="Button_PreviewMouseLeftButtonUp"/>-->            <EventSetter Event="PreviewTouchUp" Handler="Button_PreviewTouchUp"/>            <!--<Setter Property="Padding" Value="1"/>-->            <Setter Property="Template">                <Setter.Value>                    <ControlTemplate TargetType="{x:Type Button}">                        <Border x:Name="border" BorderBrush="#FF565656" BorderThickness="1" CornerRadius="6">                            <Border.Background>                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">                                    <GradientStop Color="#FFFFC547" Offset="1"/>                                    <GradientStop Color="#FFF77202"/>                                </LinearGradientBrush>                            </Border.Background>                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" TextElement.Foreground="White" TextElement.FontWeight="Bold" TextElement.FontSize="18"/>                            <!--<TextBlock TextWrapping="Wrap" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="21.333"/>-->                        </Border>                        <ControlTemplate.Triggers>                            <Trigger Property="IsPressed" Value="True">                                <Setter Property="Background" TargetName="border">                                    <Setter.Value>                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">                                            <GradientStop Color="Gray" Offset="1"/>                                            <GradientStop Color="#FF2D2D2D" Offset="0"/>                                        </LinearGradientBrush>                                    </Setter.Value>                                </Setter>                            </Trigger>                        </ControlTemplate.Triggers>                    </ControlTemplate>                </Setter.Value>            </Setter>        </Style>        <Style TargetType="{x:Type TextBox}">            <Setter Property="SnapsToDevicePixels" Value="True"/>            <Setter Property="FontFamily" Value="Arial" />            <Setter Property="FontSize" Value="12" />            <Setter Property="BorderThickness" Value="1,1,0,0"/>            <Setter Property="MinHeight" Value="20" />            <Setter Property="Background" Value="{DynamicResource TextBox_BG}" />            <Setter Property="Foreground" Value="Black" />            <Setter Property="BorderBrush" Value="{DynamicResource TextBox_BD}"/>            <Setter Property="Padding" Value="5,1"/>            <Setter Property="HorizontalContentAlignment" Value="Left"/>            <Setter Property="VerticalContentAlignment" Value="Center"/>            <Setter Property="AllowDrop" Value="true"/>            <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>            <Setter Property="Stylus.IsTouchFeedbackEnabled" Value="False"/>            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>            <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>            <Setter Property="Template">                <Setter.Value>                    <ControlTemplate TargetType="{x:Type TextBox}">                        <Grid>                            <Border x:Name="TextBox_Outer" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"							BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">                                <Border x:Name="TextBox_Inner" BorderBrush="{DynamicResource TextBox_InnerBD}" BorderThickness="0,0,1,1" Padding="{TemplateBinding Padding}"/>                            </Border>                            <Rectangle x:Name="Lfet_Boder" Fill="{DynamicResource TextBox_InnerLeft}" HorizontalAlignment="Left" Width="1" Margin="1"/>                            <Rectangle x:Name="Top_Boder" Fill="{DynamicResource TextBox_InnerTop}" VerticalAlignment="Top" Height="1" Margin="1"/>                            <Rectangle x:Name="Right_Boder" Fill="{DynamicResource TextBox_InnerRight}" HorizontalAlignment="Right" Width="1" Margin="1,2,1,1"/>                            <Rectangle x:Name="Bottom_Boder" Fill="{DynamicResource TextBox_InnerBottom}" VerticalAlignment="Bottom" Height="1" Margin="1,1,2,1"/>                            <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>                        </Grid>                        <ControlTemplate.Triggers>                            <Trigger Property="IsEnabled" Value="false">                                <Setter Property="BorderBrush" TargetName="TextBox_Outer" Value="{DynamicResource TextBox_BD_Unable}"/>                                <Setter Property="Background" TargetName="TextBox_Outer" Value="{DynamicResource TextBox_BG_Unable}"/>                                <Setter Property="BorderBrush" TargetName="TextBox_Inner" Value="{DynamicResource TextBox_InnerBD_Unable}"/>                                <Setter Property="Fill" TargetName="Lfet_Boder" Value="{DynamicResource TextBox_InnerLeft_Unable}"/>                                <Setter Property="Fill" TargetName="Top_Boder" Value="{DynamicResource TextBox_InnerTop_Unable}"/>                                <Setter Property="Fill" TargetName="Right_Boder" Value="{DynamicResource TextBox_InnerRight_Unable}"/>                                <Setter Property="Fill" TargetName="Bottom_Boder" Value="{DynamicResource TextBox_InnerBottom_Unable}"/>                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>                            </Trigger>                        </ControlTemplate.Triggers>                    </ControlTemplate>                </Setter.Value>            </Setter>        </Style>    </Window.Resources>    <Window.Triggers>        <EventTrigger SourceName="fullKeyboard" RoutedEvent="Window.Loaded">            <BeginStoryboard>                <Storyboard>                    <DoubleAnimation Storyboard.TargetName="fullKeyboard" Storyboard.TargetProperty="Opacity"                        From="0" To="1" Duration="0:0:0.2">                    </DoubleAnimation>                </Storyboard>            </BeginStoryboard>        </EventTrigger>    </Window.Triggers>    <Border Background="Gray" Width="630" Height="270" CornerRadius="0,0,10,10" BorderThickness="1" BorderBrush="Black">        <Grid>            <Grid.RowDefinitions>                <RowDefinition Height="10"/>                <RowDefinition Height="*"/>            </Grid.RowDefinitions>            <Rectangle Fill="DimGray">                <Rectangle.Effect>                    <DropShadowEffect ShadowDepth="0"/>                </Rectangle.Effect>            </Rectangle>            <TextBlock x:Name="FullKeyboardTitle" FontSize="20" Foreground="White" Margin="2"  HorizontalAlignment="Left" VerticalAlignment="Center">            </TextBlock>            <Grid Grid.Row="1">                <Grid.RowDefinitions>                    <RowDefinition Height="10"/>                    <RowDefinition Height="50"/>                    <RowDefinition Height="*" />                    <RowDefinition Height="10"/>                </Grid.RowDefinitions>                <Grid.ColumnDefinitions>                    <ColumnDefinition Width="10"/>                    <ColumnDefinition Width="*"/>                    <ColumnDefinition Width="10"/>                </Grid.ColumnDefinitions>                <TextBox x:Name="tbValue" Margin="3,3,3,0"  FontSize="16" Height="47" Background="Transparent" BorderBrush="Gainsboro" BorderThickness="2"  Foreground="White"                     Grid.Row="1" Grid.Column="1" Tag="None" IsEnabled="True"                      HorizontalContentAlignment="Right" HorizontalAlignment="Stretch" VerticalAlignment="Top" />                <Grid x:Name="ButtonGrid" Grid.Row="2" Grid.Column="1" Margin="0,0,3,0" Grid.RowSpan="2"  >                    <Grid.RowDefinitions>                        <RowDefinition Height="40"/>                        <RowDefinition Height="40"/>                        <RowDefinition Height="40"/>                        <RowDefinition Height="40"/>                        <RowDefinition Height="40"/>                    </Grid.RowDefinitions>                    <Grid.ColumnDefinitions>                        <ColumnDefinition Width="60"/>                        <ColumnDefinition Width="60"/>                        <ColumnDefinition Width="60"/>                        <ColumnDefinition Width="60"/>                        <ColumnDefinition Width="60"/>                        <ColumnDefinition Width="60"/>                        <ColumnDefinition Width="60"/>                        <ColumnDefinition Width="60"/>                        <ColumnDefinition Width="60"/>                        <ColumnDefinition Width="60"/>                    </Grid.ColumnDefinitions>                    <Button Margin="2" Grid.Column="0" Grid.Row="0" Content="1" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="1" Grid.Row="0" Content="2" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="2" Grid.Row="0" Content="3" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="3" Grid.Row="0" Content="4" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="4" Grid.Row="0" Content="5" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="5" Grid.Row="0" Content="6" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="6" Grid.Row="0" Content="7" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="7" Grid.Row="0" Content="8" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="8" Grid.Row="0" Content="9" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="9" Grid.Row="0" Content="0" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="0" Grid.Row="1" Content="Q" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="1" Grid.Row="1" Content="W" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="2" Grid.Row="1" Content="E" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="3" Grid.Row="1" Content="R" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="4" Grid.Row="1" Content="T" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="5" Grid.Row="1" Content="Y" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="6" Grid.Row="1" Content="U" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="7" Grid.Row="1" Content="I" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="8" Grid.Row="1" Content="O" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="9" Grid.Row="1" Content="P" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="0" Grid.Row="2" Content="A" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="1" Grid.Row="2" Content="S" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="2" Grid.Row="2" Content="D" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="3" Grid.Row="2" Content="F" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="4" Grid.Row="2" Content="G" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="5" Grid.Row="2" Content="H" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="6" Grid.Row="2" Content="J" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="7" Grid.Row="2" Content="K" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="8" Grid.Row="2" Content="L" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="9" Grid.Row="2" Content="-" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="0" Grid.Row="3" Content="Z" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="1" Grid.Row="3" Content="X" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="2" Grid.Row="3" Content="C" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="3" Grid.Row="3" Content="V" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="4" Grid.Row="3" Content="B" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="5" Grid.Row="3" Content="N" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="6" Grid.Row="3" Content="M" Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="7" Grid.Row="3" Content="Space"  Style="{StaticResource btnNum}"/>                    <Button Margin="2" Grid.Column="8" Grid.Row="3" Content="A/a" Style="{StaticResource btnFunc}"/>                    <Button Margin="2" Grid.Column="9" Grid.Row="3" Content="DEL" Style="{StaticResource btnFunc}"/>                    <Button Margin="2" Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="4" Content="Clear" Style="{StaticResource btnFunc}"/>                    <Button Margin="2" Grid.Column="6" Grid.ColumnSpan="2" Grid.Row="4" Content="Cancel" Style="{StaticResource btnFunc}"/>                    <Button Margin="2" Grid.Column="8" Grid.ColumnSpan="2" Grid.Row="4" Content="OK" Style="{StaticResource btnFunc}"/>                </Grid>            </Grid>        </Grid>    </Border></Window>
 |