<Style x:Key="ButtonStyleTransBack"

TargetType="Button">

<Setter Property="Background"

Value="Transparent" />

<Setter Property="BorderBrush"

Value="Transparent" />

<Setter Property="BorderThickness"

Value="0" />

<Setter Property="Padding"

Value="0" />

<Setter Property="Template">

<Setter.Value>

<ControlTemplate TargetType="Button">

<ContentPresenter x:Name="ContentPresenter"

AutomationProperties.AccessibilityView="Raw"

Foreground="{TemplateBinding Foreground}"

BackgroundSizing="{TemplateBinding BackgroundSizing}"

Background="{TemplateBinding Background}"

BorderThickness="{TemplateBinding BorderThickness}"

BorderBrush="{TemplateBinding BorderBrush}"

ContentTemplate="{TemplateBinding ContentTemplate}"

Content="{TemplateBinding Content}"

CornerRadius="{TemplateBinding CornerRadius}"

ContentTransitions="{TemplateBinding ContentTransitions}"

HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"

Padding="{TemplateBinding Padding}"

VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">

<VisualStateManager.VisualStateGroups>

<VisualStateGroup x:Name="CommonStates">

<VisualState x:Name="Normal">

<Storyboard>

<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />

</Storyboard>

</VisualState>

<VisualState x:Name="PointerOver">

<Storyboard>

<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />

</Storyboard>

</VisualState>

<VisualState x:Name="Pressed">

<Storyboard>

<PointerDownThemeAnimation Storyboard.TargetName="ContentPresenter" />

</Storyboard>

</VisualState>

<VisualState x:Name="Disabled">

</VisualState>

</VisualStateGroup>

</VisualStateManager.VisualStateGroups>

</ContentPresenter>

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

WPF 中的 button style 的修改的更多相关文章

  1. 【转】【WPF】WPF中的Button的MouseDown事件不触发问题

    按照WPF的帮助说明,某些控件的路由事件被内部处理了,已经被标记为Handled,自行定义的事件处理代码便不再起作用了,有时候会很郁闷! 不过WPF提供了必要的方法. 1)使用相应的Preview事件 ...

  2. WPF中实现Button.Content变化的简易动画

    项目中曾要这样的需求——输入法的切换,要求从English切换到简体中文的时候,Button的Content先从English变成空白,再从空白变成简体中文, 而不是直接从English变成简体中文. ...

  3. WPF中给Button加上图标和文字

    要实现在Button里面加入图标或者图形以及文字,我们就需要在Button里面用一个WrapPanel控件,这个WrapPanel控件会把我们的图标或者文字进行包裹,并显示出来. Xaml: < ...

  4. WPF中的Style(风格,样式)(转)

    在WPF中我们可以使用Style来设置控件的某些属性值,并使该设置影响到指定范围内的所有该类控件或影响指定的某一控件,比如说我们想将窗口中的所有按钮都保持某一种风格,那么我们可以设置一个Style,而 ...

  5. WPF中的Style(风格,样式)

    作者: 周银辉  来源: 博客园  发布时间: 2009-02-27 15:04  阅读: 6698 次  推荐: 0   原文链接   [收藏]   在WPF中我们可以使用Style来设置控件的某些 ...

  6. WPF教程十:如何使用Style和Behavior在WPF中规范视觉样式

    在使用WPF编写客户端代码时,我们会在VM下解耦业务逻辑,而剩下与功能无关的内容比如动画.视觉效果,布局切换等等在数量和复杂性上都超过了业务代码.而如何更好的简化这些编码,WPF设计人员使用了Styl ...

  7. wpf 中的style

    我们通常说的模板是用来参照的,同样在WPF中,模板是用来作为制作控件的参照. 一.认识模板 1.1WPF菜鸟看模板 前面的记录有提过,控件主要是算法和数据的载体.控件的算法主要体现在可以激发的事件.可 ...

  8. WPF 中的style 样式

    WPF相较于以前学的WinForm,WPF在UI设计与动画方面的炫丽是最吸引我来学习的.在WPF中XMAL代码的引入使得代码的编写能够前后端分离,为获得更好的界面,也使得我们不得不分出一半的时间花在前 ...

  9. WPF中的Style

    一.Style基础知识 构成Style最重要的两种元素是Setter和Trigger Setter类帮助我们设置控件的静态外观风格 Trigger类帮助我们设置控件的行为风格 Setter类的Prop ...

随机推荐

  1. JVM优化过头了,直接把异常信息优化没了?

    你好呀,我是why. 你猜这次我又要写个啥没有卵用的知识点呢? 不好意思,问的稍微有点早了,啥提示都没给,咋猜呢,对吧? 先给你上个代码: public class ExceptionTest {   ...

  2. asp.net c#从SQL2008读取图片显示到网页

    //图像数据表:tx//字段id (nvarchar(50) ,image(image)//tgav为图片ID,实质为上传前的主名 (省略了.jpg) using System; using Syst ...

  3. git的一些常用基础命令

    一些常用的git命令操作简单总结 记录常用的git命令,附带命令的简单使用说明 git区域分布 remote远程仓库 repository本地仓库 index暂存区 workspace工作区 stas ...

  4. gitbook导出markdown文件为pdf格式

    前言本人想完成如题所示的操作,可是兜兜转转在网上搜了好久,不是Linux下的教程就是mac OS下的教程,而且一大堆windows的教程能够说明白的寥寥无几,本着分享的态度,鄙人今天特整理教程如下: ...

  5. vue-- 利用过滤-实现搜索框的姓名的搜索

    <div class="fl w-200 m-l-30"> <el-input placeholder="输入用户名" v-model=&qu ...

  6. phpmyadmin scripts/setup.php 反序列化漏洞(WooYun-2016-199433)

    phpmyadmin 2.x版本 POST /scripts/setup.php HTTP/1.1 Host: 192.168.49.2:8080 Accept-Encoding: gzip, def ...

  7. PHP-FPM 远程代码执行漏洞(CVE-2019-11043)

    影响范围 在 Nginx + PHP-FPM 环境下,当启用了上述 Nginx 配置后,以下 PHP 版本受本次漏洞影响,另外,PHP 5.6版本也受此漏洞影响,但目前只能 Crash,不可以远程代码 ...

  8. 数据库技术中的触发器(Trigger)——和ContentObserver功能类似

    刚总结过ContentObserver的作用和特点,顺便总结下数据库技术中的触发器(Trigger),触 发 器 分 为 表 触 发 器 . 行 触 发 器

  9. python ui自动化之多窗口切换

    wd.current_window_handle #获取当前窗口句柄 wd.window_handles #获取所有窗口句柄 wd.switch_to.window(wd.window_handles ...

  10. js中判断数据类型的四种方法总结

    js中判断数据类型的四种方法 前言 在js中,我们经常需要判断数据的类型,那么哪些方法可以用来判断数据的类型呢?哪种方法判断数据类型最准确呢? 我们来一个个分析: 1.typeof typeof是一个 ...