<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. Swift - 告警提示框(UIAlertController)的用法

    自iOS8起,苹果就建议告警框使用UIAlertController来代替UIAlertView.下面总结了一些常见的用法: 1,简单的应用(同时按钮响应Handler使用闭包函数)    1 2 3 ...

  2. 用Swift开发二维码扫描器教程

    (原文:Building a QR Code Reader in Swift 作者:Simon Ng 译者:xiaoying )我相信大多数人都知道二维码(QR code)是什么,如果你对这个概念还不 ...

  3. 简单的 "双缓冲" 绘图的例子(研究一下)

    所谓双缓冲就是先画到内存画布(如: TBitmap), 然后再转帖到目的地. 譬如下面小程序: procedure TForm1.FormCreate(Sender: TObject); begin ...

  4. 《转》Linux下的多线程编程

    原地址:http://linux.chinaunix.net/doc/program/2001-08-11/642.shtml 1 引言 线程(thread)技术早在60年代就被提出,但真正应用多线程 ...

  5. 解决Ubuntu下安装VMware错误could not open /dev/vmmon

    在安装VMware并启动新建的虚拟系统时,会出现错误could not open /dev/vmmon. 普通情况下,这是因为ubuntu系统gcc版本号的问题.我机器上是gcc-4.5,于是我将其改 ...

  6. 【编程之美】java二进制实现重建

    package com.cn.binarytree.utils; /** * @author 刘利娟 liulijuan132@gmail.com * @version 创建时间:2014年7月20日 ...

  7. java特权制度设计篇

    数据库表设计 1.1.1.   模块管理(jk_module) 项 类型 说明 id long 就是数据库记录idx号 name string 模块名称 orderid int 排序id  由小到大显 ...

  8. [Cocos2d-x]CCSpriteBatchNode的使用

    文档: http://cocos2d.cocoachina.com/document/index/class?url=dd/d95/classcocos2d_1_1_c_c_sprite_batch_ ...

  9. windows mysql安装、配置

    一.MySQL的下载: 上图中,我们选择红框部分的社区版本进行下载,MySQL支持许多平台: 我的操作系统是64位的,选择对应版本MSI版下载,弹出login界面, 选择no thanks,just ...

  10. 文件操作ofstream,open,close,ifstream,fin,依照行来读取数据, fstream,iosin iosout,fio.seekg(),文件写入和文件读写,文件拷贝和文件

     1.ofstream,open,close 写入文件 #include<iostream> #include<fstream> using namespace std; ...