单击即可达到2个按钮 [英] Reach 2 Buttons with 1 Click

查看:78
本文介绍了单击即可达到2个按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我遇到Blend 4的问题。我要做的是,在同一个位置有两个按钮,一个是隐藏的,因为另一个在它上面。现在,当我点击可见按钮时,它会变为隐藏/折叠状态,而其下方的另一个将变为
可见。现在问题是,同样的点击我想要现在变得可见的按钮,也改变它的状态,所以我想做的是只需点击其中一个按钮就可以改变2个不同按钮的状态。这很难解释但是b $ b我希望有人可以提供帮助。

I have a problem with Blend 4. What I'm trying to do, is to have 2 Buttons at the same position, one is hidden because the other is lying above it. Now when I click on the visible button it becomes hidden / collapsed and the other one below it will become visible. Now the problem is, with the same click i want the button, which now became visible, to change it state as well, so what Im trying to do is change the state of 2 different buttons with only one click on one of the buttons. It's hard to explain but I hope someone can help.

 

提前致谢。

推荐答案

嘿,

只是一个想法:

 

为两个按钮设置相同的事件处理程序。

set the same eventhandler to both buttons.

buttonA.Click + = new ...(methodxyz);

buttonA.Click += new...(methodxyz);

buttonB.Click + = new ...(methodxyz);

buttonB.Click += new...(methodxyz);

 

xyt(.....)

xyt(.....)

{

//更改状态并在此处实施您的方法

//change states&implement you method here

}

也许你需要一个整数来看,你所处的状态。

perhaps you'll need an integer to see, which state you're in.

 

希望它有所帮助,

 

Greez


这篇关于单击即可达到2个按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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