Button Style Status

<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的更多相关文章
- Button Style
Button Style BS_3STATE 与复选框一样本样式按钮可被单击变暗.变暗状态通常用于指示本样式的按键正处于禁用状态. BS_AUTO3STATE 与三状态的复选框一样当用户选中它本按钮样 ...
- wpf button style IsMouseOver
<Style x:Key="workButtonStyle" TargetType="{x:Type Button}"> <Style.Tri ...
- WPF 中的 button style 的修改
<Style x:Key="ButtonStyleTransBack" TargetType="Button"> <Setter Proper ...
- wpf textblock 会覆盖 button里面字体样式的解决方法 还有button的style覆盖。。datepicker里面的按钮的style
.(button使用contont写的时候) 当.button使用 <button.content><textBlock/></button.content>依然会 ...
- [WPF] 为Style 里的button添加鼠标点击响应事件
一个TabControl, 用的是PagedTabControl style, 在style中有个button, button在style里已经写了click事件,但是现在还需要加上一段功能,就是在响 ...
- android:style.xml
<?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2006 The Andr ...
- 【转】UGUI之用脚本动态的改变Button的背景图片 和 颜色
http://blog.csdn.net/u014771617/article/details/45102701 public Button button;void Start(){ColorBloc ...
- 浏览器的兼容模式下的button中文字垂直方向不居中显示
<button style="cursor:pointer;vertical-align: middle;" >删除</button> 这时候垂直不居中. ...
- Style样式
最重要的两个元素 :setter Trigger Style中的Setter setter是用来设置属性值的 <Style TargetType="{x:Type TextBox} ...
随机推荐
- 【linux】【CPU】【x86】平台说明
节选自 <鸟哥的linux私房菜> http://cn.linux.vbird.org/linux_basic/0520rpm_and_srpm_1.php 操作硬件平台:这是个很好玩的地 ...
- 解决 viewer.js 动态更新图片导致无法预览的问题
1.viewer.js 使用 Demo http://fengyuanchen.github.io/viewerjs/ 2.viewer.js 下载地址 https://github.com/feng ...
- 4.layhm框架初始化准备Init
hm\core\Boot 里 Boot 里run() 自动开起session 设置时区 <?php /** * Created by Haima. * Author:Haima * QQ:228 ...
- 15.Yii2.0框架where单表查询
目录 新建控制器 HomeController.php 新建model article.php 新建控制器 HomeController.php D:\xampp\htdocs\yii\control ...
- Python基础学习总结__Day4
一.装饰器 前戏: 1.函数即变量 (1)函数名为‘门牌号’即内存地址,加括号开始调用 (2)没有变量调用将清空内存 (3)匿名函数(lambda函数):没有‘门牌号’,需要赋值给变量,否则将会被清空 ...
- Python: simple drawings
import cv2; # OpenCV Python import numbers; import numpy as np; import math; import matplotlib; impo ...
- matplotlib学习记录 七
# 绘制直方图 # 假设你获取了250部电影的时长(列表a中),希望统计出这些电影时长的分布状态(比如时长为100分钟到 # 120分钟电影的数量,出现的频率)等信息,你应该如何呈现这些数据? fro ...
- 算法学习记录-查找——折半查找(Binary Search)
以前有个游戏,一方写一个数字,另一方猜这个数字.比如0-100内一个数字,看谁猜中用的次数少. 这个里面用折半思想猜会大大减少次数. 步骤:(加入数字为9) 1.因为数字的范围是0-100,所以第一次 ...
- 关于MySQL建表对DML的影响【转】
本文来自这里 今天一位同学问到线上曾经碰到过连续建表,导致阻塞普通的insert.update等.不过也没有保留现场.因此有疑问为什么建表会影响DML? 分析 首先这个现象不是在所有 ...
- PHP 教父鸟哥 Yar 的原理分析
模块越来越多,业务越来越复杂,RPC 就上场了,在 PHP 的世界里,鸟哥的作品一直备受广大网友的青睐.下面一起学习下鸟哥的 PRC 框架 Yar . 揭开 Yar 神秘面纱 RPC 采用客户端/服务 ...