<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. JavaScript数组之傻傻分不清系列(split,splice,slice)

    因业务场景需求,需要将一个数组截断而不需要影响原数组.这里来理解一下 slice,splice,split slice() 从某个已有的数组返回选定的元素.(JavaScript Array 对象) ...

  2. NOIP模拟赛 机器人

    [题目描述] 早苗入手了最新的Gundam模型.最新款自然有着与以往不同的功能,那就是它能够自动行走,厉害吧. 早苗的新模型可以按照输入的命令进行移动,命令包括‘E’.‘S’.‘W’.‘N’四种,分别 ...

  3. shell 练习 - 第七周

    1. 用shell实现传入进程pid, 查看对应进程/proc下CPU.内存指标 #!/bin/bash read -p "Input PID Value: " pid pid_e ...

  4. 【MySQL】mac环境下使用navicat premium连接mysql乱码问题

    ---恢复内容开始--- 最重要的两点:使用navicat premium创建mysql连接和在mysql连接里面创建数据库时,需要注意. 1.创建连接时,Encoding不需要手动选择,保持Auto ...

  5. python中的内建函数

    本文用作记录python中的内建函数及其功能,本文内容随时补充. 完整的内建函数及其说明参考官方文档:    https://docs.python.org/3.5/library/functions ...

  6. 剑指Offer(书):顺时针打印数组

    题目:输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下4 X 4矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 则依次打印出数字1 ...

  7. Java + golang 爬取B站up主粉丝数

    自从学习了爬虫,就想在B站爬取点什么数据,最近看到一些个up主涨粉很快,于是对up主的粉丝数量产生了好奇,所以就有了标题~ 首先,我天真的以为通过up主个人空间的地址就能爬到 https://spac ...

  8. joyoi tyvj1313 [NOIP2010初赛]烽火传递

    单调队列优化dp #include <iostream> #include <cstdio> using namespace std; int dp[1000005], n, ...

  9. 大数据学习——scala集合练习

    package com /** * Created by ZX on 2016/4/5. */ object ListTest { def main(args: Array[String]) { // ...

  10. Python守护进程、进程互斥锁、进程间通信ICP(Queue队列)、生产者消费者模型

    知识点一:守护进程 守护进程:p1.daemon=True 守护进程其实就是一个“子进程“,守护=>伴随 守护进程会伴随主进程的代码运行完毕后而死掉 进程:当父进程需要将一个任务并发出去执行,需 ...