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} ...
随机推荐
- JS - 生成UUID
function uuid(len, radix) { var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw ...
- (转)可简化iOS 应用程序开发的6个Xcode小技巧
Xcode是iPhone和iPad开发者用来编码或者开发iOS app的IDE.Xcode有很多小巧但很有用的功能,很多时候我们可能没有注意到它们,也或者我们没有在合适的水平使用这些功能简化我们的iO ...
- LeetCode(279)Perfect Squares
题目 Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9 ...
- centos7 安全配置
CentOS是最多人用来运行服务器的 Linux 版本,最新版本是 CentOS 7.当你兴趣勃勃地在一台主机或 VPS 上安装 CentOS 7 后,首要的工作肯定是加强它的安全性,以下列出的七件事 ...
- ACM-ICPC 2018 徐州赛区网络预赛 B. BE, GE or NE
In a world where ordinary people cannot reach, a boy named "Koutarou" and a girl named &qu ...
- filter 作用
过滤器 filter用于拦截用户请求,在服务器作出响应前,可以在拦截后修改request和response,这样实现很多开发者想得到的功能. filter是一个可以复用的代码片段,可以用来转换HTT ...
- Mysql新建数据库、删除数据库
新建数据库 create database db_name; //db_name为新建数据库的名字 mysql> create database db_name; Query OK, row a ...
- poj 3281 Dining(网络流+拆点)
Dining Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 20052 Accepted: 8915 Descripti ...
- JSON Undefined 问题
在IE6和IE7浏览器下或在IE8-IE10浏览器文档模式为IE7及以下时,控制台会报错:JSON is undefined. 这种错误在IE6和IE7浏览器下出现很正常,因为JSON在IE8+浏览器 ...
- day03_07 变量的重新赋值01
在cmd中退出python,需要使用quit()命令 name = "Alex Li" name2 = name print(name,name2) name = "Ja ...