如何在WPF按钮删除默认鼠标悬停效果? [英] How to remove default mouse-over effect on WPF buttons?

查看:545
本文介绍了如何在WPF按钮删除默认鼠标悬停效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是,在WPF中,每当我尝试并使用触发器或动画,默认的鼠标悬停效果(被灰色与橙色发光)更改按钮的背景颜色似乎优先。

My problem is that in WPF, whenever I try and change the colour of a button's background using triggers or animations, the default mouseover effect (of being grey with that orange glow) seems to take priority.

经过大量的搜索,我无能,如何消除这种影响。

After extensive searches I'm clueless as to how to remove this effect.

任何帮助吗?

谢谢,

尼尔

推荐答案

您需要创建自己的自定义按钮模板有逾所有状态的外观完全控制。下面是一个<一个href=\"http://mark-dot-net.blogspot.com/2007/07/creating-custom-wpf-button-template-in.html\">tutorial.

You need to create your own custom button template to have full control over the appearance in all states. Here's a tutorial.

这篇关于如何在WPF按钮删除默认鼠标悬停效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆