<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. php curl使用例子

    PHP支持的由Daniel Stenberg创建的libcurl库允许你与各种的服务器使用各种类型的协议进行连接和通讯.libcurl目前支持http.https.ftp.gopher.telnet. ...

  2. 【 android】When an app is installed on the external storage

    When an app is installed on the external storage: The .apk file is saved to the external storage, bu ...

  3. 【jquery】 选中复选框 和 return false 的影响

    $('id').attr('checked',true); return false;   如果后面接上return false 的话,复选框的钩钩不会改变,但是.is(':checked')仍然能检 ...

  4. Ubuntu系统里的python

    Ubuntu系统里,默认安装python2.7.x版本的python,直接执行python命令,打开的将是python 2.7.x版本:python3版本的需要自行安装,安装成功后,执行python3 ...

  5. meta-data

    <meta-data android:name="string"   android:resource="resource specification"  ...

  6. PYday16&17-设计模式\选课系统习题

    1.设计模式:对程序做整体得规划设计,这样做是为了更好的实现功能,使代码的可扩展性更好有27种常见的设计模式.流行的设计模式参考书:GoF设计模式.大话设计模式设计模式是为了更好的实现模块间的解耦,便 ...

  7. loj2254 「SNOI2017」一个简单的询问

    ref #include <algorithm> #include <iostream> #include <cstdio> #include <cmath& ...

  8. Selenium WebDriver-actionchain模拟鼠标右键操作

    #encoding=utf-8 import unittest import time from selenium import webdriver from selenium.webdriver i ...

  9. ccna 闫辉单臂路由 和 acl access control list

    ccna 闫辉单臂路由 和  acl   access control list 一单臂路由     当前园区网设计很少用到       成本低  小型的.局域网可用         二ACL acc ...

  10. [git 学习篇]远程创库

    实际情况往往是这样,找一台电脑充当服务器的角色,每天24小时开机,其他每个人都从这个“服务器”仓库克隆一份到自己的电脑上,并且各自把各自的提交推送到服务器仓库里,也从服务器仓库中拉取别人的提交. 完全 ...