<Window x:Class="Dxsl.WPF.APP.Views.StyleTest2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="StyleTest2" Height="" Width=""> <Grid >
<Grid.Resources>
<Style x:Key="ZoomInButton" BasedOn="{x:Null}" TargetType="{x:Type Button}">
<Setter Property="Width" Value="" />
<Setter Property="Height" Value="" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Ellipse x:Name="Shadow" Fill="#FF000000" Margin="1,1,-1,-1" Opacity="0.05" />
<Grid x:Name="DefaultState">
<Border Background="Red" Padding="" CornerRadius="">
<TextBlock Text="Red" />
</Border>
</Grid>
<Grid x:Name="HoverState" Opacity="">
<Border Background="Yellow" Padding="" CornerRadius="">
<TextBlock Text="Yellow" />
</Border>
</Grid>
<Grid x:Name="PressedState" Opacity="">
<Border Background="Green" Padding="" CornerRadius="">
<TextBlock Text="Green" />
</Border>
</Grid>
<Grid x:Name="DisabledState" Opacity="">
<Border Background="Black" Padding="" CornerRadius="">
<TextBlock Text="Black" />
</Border>
</Grid>
<Path x:Name="Glyph" Stretch="Fill" Fill="#FF6D7484" Data="F1 M 568,189L 570,189L 570,191L 572,191L 572,193L 570,193L 570,195L 568,195L 568,193L 566,193L 566,191L 568,191L 568,189 Z " Width="" Height="" HorizontalAlignment="Center" VerticalAlignment="Center" />
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="DefaultState" Storyboard.TargetProperty="Opacity" Duration="" To="" />
</Storyboard>
</VisualState>
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="HoverState" Storyboard.TargetProperty="Opacity" Duration="" To="" />
<ColorAnimation Storyboard.TargetName="Glyph" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Duration="" To="#FF1B293E" />
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="PressedState" Storyboard.TargetProperty="Opacity" Duration="" To="" />
<ColorAnimation Storyboard.TargetName="Glyph" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Duration="" To="#FF1B293E" />
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="DisabledState" Storyboard.TargetProperty="Opacity" Duration="" To="" />
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources> <DockPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<Slider Visibility="Collapsed" Name="Slider" Minimum="0.2" Maximum="" />
<Button DockPanel.Dock="Left" Width="" Height="" Click="Button_Click" Style="{DynamicResource ZoomInButton}" Content="-" />
<Button DockPanel.Dock="Right" Click="Button_Click" Style="{DynamicResource ZoomInButton}" Content="+" /> </DockPanel>
</Grid>
</Window>

Button Style

Button Style Status的更多相关文章

  1. Button Style

    Button Style BS_3STATE 与复选框一样本样式按钮可被单击变暗.变暗状态通常用于指示本样式的按键正处于禁用状态. BS_AUTO3STATE 与三状态的复选框一样当用户选中它本按钮样 ...

  2. wpf button style IsMouseOver

    <Style x:Key="workButtonStyle" TargetType="{x:Type Button}"> <Style.Tri ...

  3. WPF 中的 button style 的修改

    <Style x:Key="ButtonStyleTransBack" TargetType="Button"> <Setter Proper ...

  4. wpf textblock 会覆盖 button里面字体样式的解决方法 还有button的style覆盖。。datepicker里面的按钮的style

    .(button使用contont写的时候) 当.button使用 <button.content><textBlock/></button.content>依然会 ...

  5. [WPF] 为Style 里的button添加鼠标点击响应事件

    一个TabControl, 用的是PagedTabControl style, 在style中有个button, button在style里已经写了click事件,但是现在还需要加上一段功能,就是在响 ...

  6. android:style.xml

    <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2006 The Andr ...

  7. 【转】UGUI之用脚本动态的改变Button的背景图片 和 颜色

    http://blog.csdn.net/u014771617/article/details/45102701 public Button button;void Start(){ColorBloc ...

  8. 浏览器的兼容模式下的button中文字垂直方向不居中显示

    <button style="cursor:pointer;vertical-align: middle;" >删除</button> 这时候垂直不居中. ...

  9. Style样式

    最重要的两个元素 :setter  Trigger  Style中的Setter setter是用来设置属性值的 <Style TargetType="{x:Type TextBox} ...

随机推荐

  1. PAT 乙级 1088

    题目 题目链接:PAT 乙级 1088 题解 比较简单的一道题,下面来简单说说思路: 因为甲确定是一个两位数,因此通过简单的暴力循环求解甲的值,又根据题设条件“把甲的能力值的 2 个数字调换位置就是乙 ...

  2. ise与win8兼容解决方案

    win8中ise无法加载code,显示impact4.exe停止运行. 解决方法如下: 找到程序安装路径 1.进入文件夹  D:\Xilinx\14.6\ISE_DS\ISE\lib\nt64 把li ...

  3. Linux 用户管理(二)

    一.groupadd --create a new group 创建新用户 -g  --gid GID 二.groupdel --delete a group 三.passwd --update us ...

  4. DeepFaceLab小白入门(4):提取人脸图片!

    通过上面级片文章,你应该基本知道了换脸的流出,也能换出一个视频来.此时,你可能会产生好多疑问,比如每个环节点点到底是什么意思,那些黑漆漆屏幕输出的又是什么内容,我换脸效果这么差,该如何提升?等等,好奇 ...

  5. 反爬虫之搭建IP代理池

    反爬虫之搭建IP代理池 听说你又被封 ip 了,你要学会伪装好自己,这次说说伪装你的头部.可惜加了header请求头,加了cookie 还是被限制爬取了.这时就得祭出IP代理池!!! 下面就是requ ...

  6. Python自定义一个数组类,支持数组之间的四则运算和其他常见方法

    class MyArray: '''保证输入的内容是整型.浮点型''' def ___isNumber(self, num): if not isinstance(num, (int,float)): ...

  7. 探讨2018年最受欢迎的15顶级Python库!

    近日,数据科学网站 KDnuggets 评选出了顶级 Python 库 Top15,领域横跨数据科学.数据可视化.深度学习和机器学习.如果本文有哪些遗漏,你可以在评论区补充. 图 1:根据 GitHu ...

  8. LeetCode(234) Palindrome Linked List

    题目 Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) t ...

  9. SPOJ QTREE4 - Query on a tree IV 树分治

    题意: 给出一棵边带权的树,初始树上所有节点都是白色. 有两种操作: C x,改变节点x的颜色,即白变黑,黑变白 A,询问树中最远的两个白色节点的距离,这两个白色节点可以重合(此时距离为0). 分析: ...

  10. EXCEL常用命令

    查找和选择:定位条件(定位空值.错误值) 选择性粘贴