button 样式 触发器
<Style x:Key="Style.OkOperationButton"
TargetType="ButtonBase">
<Setter Property="Width" Value="110" />
<Setter Property="Height" Value="44" />
<Setter Property="FontSize" Value="24" />
<Setter Property="Background" Value="#FF0087FF" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ButtonBase}">
<Border x:Name="Border" Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
CornerRadius="22" Background="{TemplateBinding Background}">
<TextBlock x:Name="TextBlock"
Text="{TemplateBinding Content}"
FontSize="{TemplateBinding FontSize}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border> <ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background"
Value="#FFfcac1c" />
<Setter TargetName="TextBlock" Property="Foreground" Value="#FFFFFFFF" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Border" Property="Background" Value="#4D0087FF" />
<Setter TargetName="TextBlock" Property="Foreground" Value="#4DFFFFFF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
button 样式 触发器的更多相关文章
- android_重写button样式
这样的button样式应该源自IOS.假设安卓上实现,则须要使用android上面的layer-list来实现. 事实上layer-list有点像framlayout,作用就是覆盖. 先说一下实现原理 ...
- 【译文】CSS技术:如何正确的塑造button样式!
, but useful for */ display: inline-block; text-align: center; text-decoration: none; /* create a sm ...
- 36种漂亮的CSS3网页按钮Button样式
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...
- android中样式和自定义button样式
1)自定义button样式 一.采用图片方式 首先新建Android XML文件,类型选Drawable,根结点选selector,自定义一个文件名. 随后,开发环境自动在新建的文件里加了select ...
- wpf 导出Excel Wpf Button 样式 wpf简单进度条 List泛型集合对象排序 C#集合
wpf 导出Excel 1 private void Button_Click_1(object sender, RoutedEventArgs e) 2 { 3 4 ExportDataGrid ...
- CSS开发技巧(一):button样式设置
button样式需要注意的有几点: 1.建议有一个最小宽度,以免在文字很少时使得按钮过于窄,宽高不协调: 2.建议有一个padding,以免内部文本显得过于拥挤: 2.hover时需要有颜色变化,以告 ...
- 在Button样式中添加EventSetter,理解路由事件
XML <Window.Resources> <Style x:Key="ButtonStyle2" TargetType="{x:Type Butto ...
- UWP 改变Button样式
-----some words------ 1.Control:控制 (我们理解成控件) 2.Template:模板 3.Ellipse 椭圆 4.Content 内容 5.Presenter 节目主 ...
- button样式篇一(ant Design React)
这篇来介绍button中elementUi.iview.ant中样式结构 ant Design react ant-react中button分两个文件less: mixins.less:根据butto ...
- WPF Button 样式
WPF CheckBox 自定义样式 给Button设置ToolTip <Style TargetType="{x:Type Button}" x:Key="Def ...
随机推荐
- lg8862题解
脑抽了,一开始想着扫描线然后用线段树求历史最大值.
- 89. 格雷编码 (Medium)
问题描述 89. 格雷编码 (Medium) n 位格雷码序列 是一个由 2ⁿ 个整数组成的序列,其中: 每个整数都在范围 [0, 2ⁿ - 1] 内(含 0 和 2ⁿ - 1) 第一个整数是 0 一 ...
- drf从入门到飞升仙界 02
restful规范 # restful是一种定义web API接口的设计风格,适用于前后端分离的应用模式中 # 关于restful的10个规范 -1.数据的安全保障,通常使用https协议(http+ ...
- maven(web)项目,不自动出现overlays的上级web项目
不自动出现overlays目录,如下: 上面选择一项, 最后部署至tomcat或是其他中间件上面,overlays的上关联的上级项目就会出现
- Java基础之类型转换
类型转换 由于Java是强类型语言,所以要进行有些运算的时候,需要用到类型转换 低 --------------------------------------------------------&g ...
- 链表与malloc的疑惑
1.奇怪点:如果我只是需要一个结点的空间为什么malloc的转换形式写成--Node=(int *)malloc(sizeof(int)) 自我解答:void *malloc(unsigned int ...
- 新手:git回滚代码,合并代码解决冲突
回滚到某个tag: git reset --hard 70438034dc git push -f 合并---解决冲突---提交: Step 1. Fetch and check out the br ...
- nginx 添加ssl认证,访问静态资源 笔记
1.查看是否开启SSL模块, /usr/local/nginx/sbin ./nginx -V 2.没有开启,进入到nginx源码包目录下: 3编译 ./configure --prefix= ...
- GIMP选择,GIMP画布大小,GIMP图层
基本概念 1. 画布 2. 图层 你只能操作一个图层--就是你选中的.就看起来所有的图像都在一起,但是不同的图层中的图像是不同,不能操作没有选中的图层. 对于选择操作,要注意你选中的图层. 要获取图像 ...
- What is the Best Python IDE for Data Science?
Created by Guido van Rossum, Python was first released back in 1991. The interpreted high-level prog ...