使用混合。真正的新手问题 [英] using blend. Real newbie question

查看:82
本文介绍了使用混合。真正的新手问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是使用混合物的新手。我想制作一组看起来一样的按钮,但真正的不同之处在于,当鼠标悬停在它们上面时,它们会变成不同的颜色。

我为原始按钮创建了一个新的样式(正在转动红色)然后对于第二个按钮,我将该样式应用于它。然后我去更改第二个按钮的故事板,以便按钮变为橙色,但按钮仍然变为红色。

当然这是一个方法。你能告诉我或让我知道任何可以让我这样做的好链接。

谢谢。

Hi,

I'm real new to using blend. I wanted to make a set of buttons that all looked the same but the real difference being that when the mouse hovered over them they change to different colours.

I created a new style for my original button (which was turning red) and then for the second button I applied that style to it. Then I went to change the storyboard for the second button so that the button would turn orange instead but still the button changes to red.

surely theres a way around this. Could you please let me or let me know of any good links that will let me do that.

Thanks.

推荐答案

Hi Pritesh,

如果您希望在不同的状态下拥有相似但具有不同动画或属性(例如颜色变化)的按钮,则需要将这些按钮中的每个按钮存储为自己的唯一控制模板。

我要做的是创建一个按钮的外观,没有不同颜色的动画,并保存为按钮控制模板(例如ButtonGeneral)。然后我将复制更多这些按钮,然后创建相同按钮控件模板的副本,每个模板在Mouse Over状态下具有不同的颜色,并且每个都存储为单独的按钮控件模板(例如ButtonRed,ButtonBlue,ButtonGreen等) 。如果您真的想要为单个按钮控件模板使用不同的颜色,则需要编写代码并使其成为自定义用户控件。

这是否回答了您的问题?如果是,请标记为已回答,以便其他人面临类似问题。
Hi Pritesh,

If you want to have buttons that look alike but have different animations or properties (e.g. change of color) during different states, each of these buttons would need to be stored as a unique Control Template of their own.

What I would do is create the look and feel of one button, without the animations with the different colors, and saved as a Button Control Template (e.g. ButtonGeneral). Then I would duplicate more of these buttons, and then create copies of the same button control template, each with a different color in the Mouse Over state, and each stored as a seperate Button Control Template (e.g. ButtonRed, ButtonBlue, ButtonGreen, etc). If you really want to have different colors for a single Button Control Template, you would need to write code and make it maybe a Custom User Control.

Did this answer your question? If yes please mark as answered so it might help others facing similar issues.


这篇关于使用混合。真正的新手问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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