更改按钮的悬停文本颜色 [英] Change the hover text color of a button

查看:89
本文介绍了更改按钮的悬停文本颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在silverlight的表达式混合中更改悬停按钮上文本颜色的最简单方法是什么?

What is the simplest way to change the color of the text on a hovered button in expression blend for silverlight?

推荐答案

这很简单。您可能需要查看有关更改样式模板的教程。

您要做的是选择要修改的按钮。在设计视图的左上角,您将看到一个以所选按钮[ButtonName]命名的下拉菜单。单击向下箭头,然后转到编辑模板>编辑当前。执行此操作后,将加载按钮模板进行修改。然后在"事件"面板下,您应该看到列表中的所有按钮事件。您要修改的事件是IsMouseOver事件。在事件面板中选择事件。执行此操作时,将打开时间线录制。因此,您现在需要做的就是将文本颜色修改为鼠标悬停在按钮上时的颜色。完成后,在事件面板中返回默认值,它应关闭时间轴录制。现在要停止编辑模板,只需单击设计视图左上角的[ButtonName],它就应该关闭模板。

一旦你运行下一个构建,按钮应该按你的方式做出反应在它的模板中定义。

祝你好运,布莱恩
This is fairly simple to do. You may want to check out a tutorial that talks about changing style templates.

What you are going to want to do is select the button you want to modify. In the top left portion of the design view you will see a drop down menu named after the selected button [ButtonName]. Click on the downward arrow and go to Edit Template > Edit Current. Once you do this it will load the buttons template to modify. Then under your Events panel you should see all of the button events in the list. The event you want to modify is the IsMouseOver event. Select the event in the events panel. When you do this, timeline recording will be turned on. So, all you need to do now is to modify the text color to what you want it to be when the mouse is over the button. Once you do that, in your events panel go back to default and it should turn off timeline recording. Now to stop editing the template you just click on the [ButtonName] on the top left of the design view and it should close the template.

Once you run your next build the button should react the way you defined in it's template.

Good luck,
Brian


这篇关于更改按钮的悬停文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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