<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. 14.2.5.4 Physical Structure of an InnoDB Index InnoDB Index 的物理结构

    14.2.5.4 Physical Structure of an InnoDB Index InnoDB Index 的物理结构 所有的InnoDB indexes 是B-trees ,index ...

  2. cct信息安全

    基本信息 全国计算机等级考试三级教程——信息安全技术(2016年版) 作    者:教育部考试中心 编 出 版 社:高等教育出版社 出版时间:2015-12-1 ISBN:9787040443035 ...

  3. 【Demo 0004】Java基础-类封装性

    本章学习要点:       1.  Java封装特性;       2.  掌握类的定义:       3.  掌握类的调用方法; 一.封装特性        Java 纯面向对象语言,面向对象语言遵 ...

  4. 在JAVA中开发应用之html5离线应用

     1.环境搭建(Tomcat为例): 在Tomcat中的conf配置文件中web.xml中添加离线配置: <!--HTML5--> <mime-mapping> <ext ...

  5. [C#基础] 委托

    什么是委托 委托是一个类,它定义了方法的类型,使得可以将方法当作另一个方法的参数来进行传递,这种将方法动态地赋给参数的做法,可以避免在程序中大量使用If-Else(Switch)语句,同时使得程序具有 ...

  6. 与众不同 windows phone (21) - Device(设备)之摄像头(拍摄照片, 录制视频)

    原文:与众不同 windows phone (21) - Device(设备)之摄像头(拍摄照片, 录制视频) [索引页][源码下载] 与众不同 windows phone (21) - Device ...

  7. ThinkPHP3.2 常量参考

    原文:ThinkPHP3.2 常量参考 预定义常量 预定义常量是指系统内置定义好的常量,不会随着环境的变化而变化,包括: URL_COMMON 普通模式 URL (0) URL_PATHINFO PA ...

  8. 14.4.2 Configuring InnoDB for Read-Only Operation 配置InnoDB 永于只读操作:

    14.4.2 Configuring InnoDB for Read-Only Operation 配置InnoDB 永于只读操作: 你可以查询InnoDB 表 MySQL 数据目录是在只读介质里,通 ...

  9. EJBCA 在windows上的安装

    为了做EJBCA的封装測试,在我自己电脑上装了个,可是在国内的开发上面的介绍实在是太少.有的也仅仅是些傻瓜式的安装介绍,这是介绍在Windows上安装的过程,(后面介绍下 linux 红帽上的),有些 ...

  10. POJ2599+POJ2082【最大矩形面积】

    题目链接:http://poj.org/problem?id=2559 题目链接:http://poj.org/problem?id=2082 这一类题目的解法,不知自己闲着没事就做了两个. 果然压栈 ...