123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <Window x:Class="MECF.Framework.UI.Client.CenterViews.Dialogs.NumberKeyboard"
- xmlns:local="clr-namespace:MECF.Framework.UI.Client.CenterViews.Dialogs"
- 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"
- mc:Ignorable="d"
- Title="FullKeyboard" x:Name="fullKeyboard" AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize" Background="#7F6F6F6F" Height="316.667" Width="264" 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="18" />
- <!--<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="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
- <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
- <Setter Property="Stylus.IsTouchFeedbackEnabled" Value="False"/>
- <EventSetter Event="PreviewMouseLeftButtonDown" Handler="Button_MouseLeftButtonDown"/>
- <EventSetter Event="PreviewTouchUp" Handler="Button_PreviewTouchUp"/>
- <!--<EventSetter Event="PreviewMouseLeftButtonUp" Handler="Button_PreviewMouseLeftButtonUp"/>-->
- <!--<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.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>
- </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" Height="310" CornerRadius="0,0,10,10" BorderThickness="1" BorderBrush="Black">
- <Grid Grid.Row="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="10"/>
- <RowDefinition Height="50"/>
- <RowDefinition Height="250" />
- <RowDefinition Height="10"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="10"/>
- <ColumnDefinition Width="205*"/>
- <ColumnDefinition Width="403*"/>
- <ColumnDefinition Width="10"/>
- </Grid.ColumnDefinitions>
- <TextBox x:Name="tbValue" Tag="None" Margin="3,3,5,0" FontSize="16" Height="47" Background="Transparent" BorderBrush="Gainsboro" BorderThickness="2" Foreground="White"
- Grid.Row="1" Grid.Column="1"
- HorizontalContentAlignment="Right" VerticalAlignment="Top" Grid.ColumnSpan="2" RenderTransformOrigin="0.5,0.5" >
- <TextBox.RenderTransform>
- <TransformGroup>
- <ScaleTransform/>
- <SkewTransform/>
- <RotateTransform Angle="-0.209"/>
- <TranslateTransform/>
- </TransformGroup>
- </TextBox.RenderTransform>
- </TextBox>
- <Grid x:Name="ButtonGrid" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" >
- <Grid.RowDefinitions>
- <RowDefinition Height="41"/>
- <RowDefinition Height="41"/>
- <RowDefinition Height="41"/>
- <RowDefinition Height="41"/>
- <RowDefinition Height="41"/>
- <RowDefinition Height="41"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="80"/>
- <ColumnDefinition Width="80"/>
- <ColumnDefinition Width="80"/>
- </Grid.ColumnDefinitions>
- <Button Margin="2" Grid.Column="0" Grid.Row="0" Content="7" Style="{StaticResource btnNum}"/>
- <Button Margin="2" Grid.Column="1" Grid.Row="0" Content="8" Style="{StaticResource btnNum}"/>
- <Button Margin="2" Grid.Column="2" Grid.Row="0" Content="9" Style="{StaticResource btnNum}"/>
- <Button Margin="2" Grid.Column="0" Grid.Row="1" Content="4" Style="{StaticResource btnNum}"/>
- <Button Margin="2" Grid.Column="1" Grid.Row="1" Content="5" Style="{StaticResource btnNum}"/>
- <Button Margin="2" Grid.Column="2" Grid.Row="1" Content="6" Style="{StaticResource btnNum}"/>
- <Button Margin="2" Grid.Column="0" Grid.Row="2" Content="1" Style="{StaticResource btnNum}"/>
- <Button Margin="2" Grid.Column="1" Grid.Row="2" Content="2" Style="{StaticResource btnNum}"/>
- <Button Margin="2" Grid.Column="2" Grid.Row="2" Content="3" Style="{StaticResource btnNum}"/>
- <Button Margin="2" Grid.Column="0" Grid.Row="3" Content="0" Style="{StaticResource btnNum}" />
- <Button Margin="2" Grid.Column="1" Grid.Row="3" Content="." Style="{StaticResource btnNum}" />
- <Button x:Name="btnMinus" Margin="2" Grid.Column="2" Grid.Row="3" Content="-" Style="{StaticResource btnNum}" />
- <Button x:Name="btnQuotes" Margin="2" Grid.Column="0" Grid.Row="4" Content=":" Style="{StaticResource btnNum}" />
- <Button Margin="2" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="4" Content="DEL" Style="{StaticResource btnFunc}"/>
- <Button x:Name="btnCancel" Margin="1,3,3,1" Grid.Column="0" Grid.Row="5" Content="Cancel" Style="{StaticResource btnFunc}"/>
- <Button x:Name="btnClear" Margin="1,3,3,1" Grid.Column="1" Grid.Row="5" Content="Clear" Style="{StaticResource btnFunc}"/>
- <Button Margin="1,3,3,1" Grid.Column="2" Grid.Row="5" Content="OK" Style="{StaticResource btnFunc}"/>
- </Grid>
- </Grid>
- </Border>
- </Window>
|