按下按钮时保持更改状态 [英] Keep Changed State When Button Pressed

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

问题描述


我是表达混合4的新手,所以此刻犯了很多错误。基本上我正在尝试开发隐藏的菜单,然后单击它出现的按钮并保持在那里。然后当您点击按钮时,菜单会再次消失。


我很难让菜单在进入视图后保持不变。有没有人知道哪个教程涵盖了这种类型的控制。或者对需要做什么的解释会很棒。


提前感谢您的时间。


Marce 

解决方案

"菜单"控件具有"可见性"属性,您可以根据所需的行为设置该属性。 http://msdn.microsoft.com/en-us/library/system.windows.visibility.aspx


 


这篇文章提供了有关如何将可见性绑定到ToggleButton的良好信息,这听起来就像你想要做的那样。   http://stackoverflow.com/questions / 1534208 / binding-to-a-wpf-togglebuttons-ischecked-state%20


 


希望有所帮助。


Hi,

I am new to expression blend 4 so making lots of mistakes at the moment. Basically I'm trying to develop a menu which is hidden, then you click a button it appears and stays there. Then when you click the button again the menu disappears.

I'm struggling to get the menu to stay put once it comes into view. Is there a tutorial anyone knows of which covers this type of control. Or an explanation of what needs to be done would be great.

Thanks in advance for your time.

Marce 

解决方案

The Menu control has a Visibility property that you can set depending on what behavior you want. http://msdn.microsoft.com/en-us/library/system.windows.visibility.aspx

 

This post has good information on how to bind Visibility to a ToggleButton, which sounds like what you're trying to do. http://stackoverflow.com/questions/1534208/binding-to-a-wpf-togglebuttons-ischecked-state%20

 

Hope that helps.


这篇关于按下按钮时保持更改状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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