prevent从开关状态切换按钮 [英] Prevent ToggleButton from switching state

查看:133
本文介绍了prevent从开关状态切换按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个切换按钮,当你点击它,我不希望状态改变。我会处理的状态改变自己,当我收到的反馈后,无论从任何按钮切换。我怎么可能prevent上点击状态变化?

I have a ToggleButton, when you click it, I don't want the state to change. I will handle state changes myself when after I receive feedback from whatever the button toggled. How might I prevent the state change on click?

推荐答案

虽然我认为你可以将其标记为残疾人,我不认为这是一个好主意,因为用户习惯于这种有一定的语义按钮。

While I think you can just mark it as disabled, I don't think it is a good idea, as users are used to a certain semantic of such a button.

如果你只是想显示一些状态,你为什么不使用的ImageView,并显示不同的图像取决于状态?

If you only want to show some state, why don't you use an ImageView and show different images depending on state?

这篇关于prevent从开关状态切换按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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