WPF带小箭头的按钮
XAML代码:
<ControlTemplate x:Key="btnTpl" TargetType="RadioButton">
<StackPanel Orientation="Vertical" Height="30" Background="Transparent">
<Border Name="border" Background="#006AB8" Height="25">
<ContentPresenter Name="contentPre" VerticalAlignment="Center" HorizontalAlignment="Center" TextElement.Foreground="#FFF" TextElement.FontSize="12" Margin="0"/>
</Border>
<Path x:Name="path" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 6 4 L 12 0 Z">
<Path.Fill>
<SolidColorBrush Color="#006AB8" />
</Path.Fill>
</Path>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Margin" Value="2 2 2 0"></Setter>
<Setter TargetName="border" Property="Height" Value="23"></Setter>
<Setter Property="TextElement.FontSize" Value="11"></Setter>
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="border" Property="Border.Background" Value="#15BDF7"></Setter>
<Setter TargetName="path" Property="Fill" >
<Setter.Value>
<SolidColorBrush Color="#15BDF7" />
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
效果图:
WPF带小箭头的按钮的更多相关文章
- IE 选择文字后 显示小箭头 加速按钮
IE - 工具 - Internet选项 - 高级 - 不选择<在选择是显示加速按钮>选项就可以了.
- 如何重载ComboBox 使其下拉按钮(带下箭头的)和下拉列表的垂直滚动条的宽度改变?(自绘ComboBox) [转]
原文地址:http://bbs.csdn.net/topics/390135022 http://blog.csdn.net/scsdn/article/details/4363299 想使用winf ...
- WPF 带清除按钮的文字框SearchTextBox
原文:WPF 带清除按钮的文字框SearchTextBox 基于TextBox的带清除按钮的搜索框 样式部分: <!--带清除按钮文字框--> <Style TargetType=& ...
- 隐藏WPF ToolBar 左侧的移动虚线和右侧的小箭头
原文:隐藏WPF ToolBar 左侧的移动虚线和右侧的小箭头 上面的图是两个工具栏的链接处. 去除蓝色部分的方法是 设置工具栏的ToolBarTray.IsLocked附加选项为True ...
- 用CSS3实现带小三角形的div框(不用图片)
现在看到了很多带小三角形的方框,如微信.Mac版的QQ.QQ空间的时间轴等等,在聊天或者是发表的状态的内容外面都有一个带小三角形的矩形框包围着,感觉看着很不错,于是决定亲自动手写一个,我上次用的是偏移 ...
- 带左右箭头切换的自动滚动图片JS特效
效果图 按钮 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www. ...
- win10快捷方式小箭头怎么去掉
为了演示,先来看看桌面图标是有小箭头的. 1.打开注册表 按下快捷键"win+R",然后输入"regedit",并点击确认按钮. 2.搜索HKEY_CLASSE ...
- 移除HTML5 input在type="number"时的上下小箭头
/*移除HTML5 input在type="number"时的上下小箭头*/ input::-webkit-outer-spin-button, input::-webkit-in ...
- 去掉Win7快捷方式小箭头(win10通用)
我是一个有强迫症的优化控 , 因为近视的缘故 , 喜欢将桌面图标放大 , 但是win7快捷方式的小箭头 , 确实不好看 . 用win7魔方之类的软件 , 可以解决这个问题 , 但是有时候重启 , ...
随机推荐
- python Flask篇(一)
MarkdownPad Document *:first-child { margin-top: 0 !important; } body>*:last-child { margin-botto ...
- [代码]set容器查找操作使用
对于set容器来说,查找功能是该容器的主要优势,故针对该容器查找功能作一测试. 主要有如下API接口: 测试源码如下: #include<set> void test(){ set< ...
- Centos 7.2基础安装和配置(含分区方案建议)
景:windows桌面运维为主的我,前几天接到一个去某客户上架安装服务器的工作任务,含糊的说要上架几台服务器顺便安装Centos系统,于是我便下载了一个Centos7.2版本的镜像,顺利的用USBwr ...
- leetcode110
/** * Definition for a binary tree node. * public class TreeNode { * public int val; * public TreeNo ...
- ehlib 用法记录
点列头排序 1.add ehlibado.pas to project. 2.grideh>ColumnDefValues>Title>TitleButton=true; 3.g ...
- sass compact方法的实现
不想依赖compass的编译器,但sass的又没有compact方法,于是自己造轮子.最早时在stackoverflow看到一个 @function compact($var-1, $var-2: f ...
- Struts2拦截器概述
--------------------siwuxie095 Struts2 拦截器概述 1.Struts2 框架封装的很多功能都在 Struts2 的拦截器中 2.Struts2 框架中有很多拦截器 ...
- centos6.5下使用yum完美搭建LNMP环境(php5.6)
准备工作 配置防火墙,开启80端口.3306端口删除原有的 iptables , 添加合适的配置 rm -rf /etc/sysconfig/iptables vi /etc/sysconfig/ip ...
- git忽略某个文件夹
data/cache/* !data/cache/index.html !data/cache/smiOAuthToken.php
- Java 设计模式系列(十五)迭代器模式(Iterator)
Java 设计模式系列(十五)迭代器模式(Iterator) 迭代器模式又叫游标(Cursor)模式,是对象的行为模式.迭代子模式可以顺序地访问一个聚集中的元素而不必暴露聚集的内部表象(interna ...