<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TouchKeyboard.Keyboard" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <Style x:Key="MyFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Control}">
<Grid Margin="4 2">
<Rectangle x:Name="r1" StrokeThickness="" Stroke="Black" StrokeDashArray="2 2"/>
<Border x:Name="border" Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}" CornerRadius="" BorderThickness="" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> <Style x:Key="ShadowStyle">
<Setter Property="Control.Foreground" Value="LightGray" />
</Style> <Style x:Key="InformButton" TargetType="{x:Type Button}">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Margin" Value=""/>
<Setter Property="FontFamily" Value="Verdana"/>
<Setter Property="FontSize" Value="18px"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FocusVisualStyle" Value="{StaticResource MyFocusVisual}" />
<Setter Property="Background" >
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
<GradientStop Color="#FF0EFF1D" Offset="0.059"/>
<GradientStop Color="#FFF7FFF7" Offset=""/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border"
BorderThickness=""
Padding="4,2"
CornerRadius="" Height="Auto" Width="Auto" SnapsToDevicePixels="False" BorderBrush="#FF858585">
<Border.Effect>
<DropShadowEffect BlurRadius="" Direction="" ShadowDepth="" Opacity="0.425" RenderingBias="Quality"/>
</Border.Effect>
<Border.Background>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFCECECE" Offset=""/>
<GradientStop Color="#FFF7FFF7"/>
</LinearGradientBrush>
</Border.Background>
<Grid >
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center" x:Name="contentShadow"
Style="{StaticResource ShadowStyle}"/>
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center" x:Name="content"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#FF4788c8" />
<Setter Property="Foreground" Value="#FF4788c8" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" >
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
<GradientStop Color="#FFFFD190" Offset="0.50"/>
<GradientStop Color="Orange" Offset="0.95"/>
<GradientStop Color="#FFFFD190" Offset=""/>
</LinearGradientBrush>
</Setter.Value>
</Setter> <Setter TargetName="content" Property="RenderTransform" >
<Setter.Value>
<TranslateTransform Y="1.0" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsDefaulted" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#FF282828" />
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#FF282828" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Opacity" Value="0.7" />
<Setter Property="Foreground" Value="Gray" />
</Trigger> </ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> <Style TargetType="{x:Type local:TouchScreenKeyboard}">
<Setter Property="Background" Value="White"/>
<Setter Property="Width" Value=""/>
<Setter Property="Height" Value=""/> <Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TouchScreenKeyboard}">
<Border
CornerRadius=""
Focusable="False" BorderBrush="{x:Null}" BorderThickness="">
<Border BorderBrush="{x:Null}" BorderThickness="" CornerRadius="">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFDADADA" Offset="0.442"/>
<GradientStop Color="#FFEFEFEF"/>
<GradientStop Color="#FFEDEDED" Offset=""/>
</LinearGradientBrush>
</Border.Background>
<Border BorderThickness="1,1,1,5" CornerRadius="">
<Border.BorderBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0.809">
<GradientStop Color="#FF4E4E4E" Offset="0.638"/>
<GradientStop Color="#FFCCCCCC" Offset=""/>
</LinearGradientBrush>
</Border.BorderBrush>
<Border BorderBrush="{x:Null}" BorderThickness="2,4,2,0" CornerRadius="" Padding=""> <StackPanel Orientation="Vertical"> <StackPanel Orientation="Horizontal" > <Button Command="local:TouchScreenKeyboard.Cmd1" Style="{StaticResource InformButton}" Width="" Height="" Content=""/> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.Cmd2" Width="" Height="" Content=""/> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.Cmd3" Width="" Height="" Content=""/> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.CmdBackspace" Width="" Height="" Content="回删"/> </StackPanel>
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.Cmd4" Width="" Height="" Content=""/> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.Cmd5" Width="" Height="" Content=""/> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.Cmd6" Width="" Height="" Content=""/> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.CmdClear" Width="" Height="" Content="清空"/>
</StackPanel> <StackPanel Orientation="Horizontal">
<Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.Cmd7" Width="" Height="" Content="" /> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.Cmd8" Width="" Height="" Content=""/> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.Cmd9" Width="" Height="" Content=""/> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.CmdEnter" Width="" Height="" Content="确定"/> </StackPanel> <StackPanel Orientation="Horizontal">
<Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.Cmd0" Width="" Height="" Content=""/> <Button Style="{StaticResource InformButton}" Command="local:TouchScreenKeyboard.CmdGreaterThan" Width="" Height="" Content="."/> <Button Style="{StaticResource InformButton}" Width="" Height="" Content=" iEvent~" FontSize=""/> </StackPanel> </StackPanel>
</Border> </Border>
</Border> </Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Opacity" Value="0.98"/>
</Style> </ResourceDictionary>

WPF 数字小键盘Themes的更多相关文章

  1. WinForm数字小键盘/WPF数字小键盘

    模仿原本的WinForm触摸屏小键盘制作WPF触摸屏小键盘 原WinForm触摸屏小键盘样式(WinForm采用Krypton系列控件)如下图: Designer代码如下: // // BtnNum1 ...

  2. Ay.Framework.WPF 2.0建立项目到底有多快

    2015-3-31 今天我已经优化了很多地方,让客户使用起来几乎是傻瓜式使用了,废话不多说,我们开始吧. 默认的我提供了一些图片,但是也只占用了8M多,2.0版本目前总共有45M左右大小,毕竟包含了f ...

  3. WPF 使用DMSkin for WPF 快速搭建漂亮的WPF程序

    DMSkin-for-WPF是一个基于WPF的.Net WPF开源界面库,实现了无边框的WPF开发方案,内置部分控件模板. 你可以参照模板自行修改完善.(以下简称DFW). 核心 DFW实现了比较完美 ...

  4. WPF系列教程——(一)仿TIM QQ界面 - 简书

    原文:WPF系列教程--(一)仿TIM QQ界面 - 简书 TIM QQ 我们先来看一下TIM QQ长什么样,整体可以将界面分为三个部分 TIM QQ 1. 准备 阅读本文假设你已经有XAML布局的基 ...

  5. Open-source Tutorial - Material Design for WPF UI

    安装 Material Design Themes 通过 NuGet 包管理器搜索自动安装 通过 NuGet 包管理器控制台手动安装 Install-Package MaterialDesignThe ...

  6. 基于WPF系统框架设计(5)-Ribbon整合Avalondock 2.0实现多文档界面设计(二)

    AvalonDock 是一个.NET库,用于在停靠模式布局(docking)中排列一系列WPF/WinForm控件.最新发布的版本原生支持MVVM框架.Aero Snap特效并具有更好的性能. Ava ...

  7. C# WPF实用的注册窗体

    时间如流水,只能流去不流回! 点赞再看,养成习惯,这是您给我创作的动力! 本文 Dotnet9 https://dotnet9.com 已收录,站长乐于分享dotnet相关技术,比如Winform.W ...

  8. C# WPF抽屉效果实现(C# WPF Material Design UI: Navigation Drawer & PopUp Menu)

    时间如流水,只能流去不流回! 点赞再看,养成习惯,这是您给我创作的动力! 本文 Dotnet9 https://dotnet9.com 已收录,站长乐于分享dotnet相关技术,比如Winform.W ...

  9. .NET CORE(C#) WPF简单菜单MVVM绑定

    微信公众号:Dotnet9,网站:Dotnet9,问题或建议:请网站留言, 如果对您有所帮助:欢迎赞赏. .NET CORE(C#) WPF简单菜单MVVM绑定 阅读导航 本文背景 代码实现 本文参考 ...

随机推荐

  1. 移动无边框窗体(设置标志位更流畅,或者发送WM_SYSCOMMAND和SC_MOVE + HTCAPTION消息)

    移动无边框窗体的代码网上很多,其原理都是一样的,但是是有问题的,我这里只是对其修正一下 网上的代码仅仅实现了两个事件 void EditDialog::mousePressEvent(QMouseEv ...

  2. Lucene.Net 2.3.1开发介绍 —— 四、搜索(一)

    原文:Lucene.Net 2.3.1开发介绍 -- 四.搜索(一) 既然是内容筛选,或者说是搜索引擎,有索引,必然要有搜索.搜索虽然与索引有关,那也只是与索引后的文件有关,和索引的程序是无关的,因此 ...

  3. c 有意思的数组初始化

    c 有意思的数组初始化 #include <stdio.h> int main() { int i = 0; char a[1024]; char a0[10] = {}; char a1 ...

  4. UVA 116 Unidirectional TSP(dp + 数塔问题)

     Unidirectional TSP  Background Problems that require minimum paths through some domain appear in ma ...

  5. haproxy 服务端超时时间 timeout server 17000 --后台程序17秒没有响应,返回超时

    haproxy 服务端超时时间: haproxy 配置: timeout server 17000 --后台程序17秒没有响应,返回超时 Jun 27 09:29:56 localhost hapro ...

  6. C++历史

    C++历史 早期C++ •1979: 首次实现引入类的C(C with Classes first implemented) 1.新特性:类.成员函数.继承类.独立编译.公共和私有访问控制.友元.函数 ...

  7. Button UI Kit CSS3美丽Buttonbutton

    <!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...

  8. struts2错误验证

    在登陆的时候一般要用错误验证功能.效果如图: 在action层的写法: this.addActionError("username或password错误"); 在jsp页面上取值: ...

  9. AVOS_百度百科

    AVOS_百度百科 AVOS 目录 公司产品 AVOS 是 YouTube 创始人 Chad Hurley 和 Steve Chen(陈士骏)创立的互联网公司.    编辑本段公司产品    产品包括 ...

  10. 正确理解HTML,XHTML页面的头部doctype定义

    摘自http://www.west263.com/info/html/wangyezhizuo/css/20080225/42390.html 当我们制作页面的时候,总会在它的源代码头部看到一串声明, ...