更改鼠标悬停时的样式
我有两种样式的按钮。第一个用于正常状态,第二个用于 mouseOver 状态。如何改变鼠标进入时的按钮样式?在 Blend 中,我尝试创建故事板并更改样式,但什么也没发生。
I have 2 styles for a button. The first one is for normal state and the second is for mouseOver state. How can I change the button style when the mouse enters it? In Blend I tried to create a storyboard and change the style but nothing happened.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将
Style
属性绑定到IsMouseOver
并使用通用的“真值”/“假值”转换器。您可以像这样指定转换器
,然后将
Style
绑定到IsMouseOver
BooleanObjectConverter
You could bind the
Style
property toIsMouseOver
and use a generic "true value"/"false value" converter.You can specify the converter like this
And then bind
Style
toIsMouseOver
BooleanObjectConverter