我可以使 WPF 单选按钮看起来像复选框吗?

发布于 2024-08-08 14:06:07 字数 41 浏览 2 评论 0原文

我想要具有单选按钮的行为,但将它们显示为复选框给用户。这容易做到吗?

I want to have the behavior of RadioButtons, but show them as CheckBoxes to the user. Is this easy to do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

往昔成烟 2024-08-15 14:06:07

是的,您可以使用 ControlTemplate 轻松完成。编辑复选框的模板并将其复制到您的单选按钮。

我同意您应该谨慎执行此操作,因为您很容易使用户感到困惑。

Yes you can easily do using a ControlTemplate. Edit the template of a CheckBox and copy it to your RadioButton.

I agree that you should do this with caution as you easily can confuse the user.

兔姬 2024-08-15 14:06:07

你可能可以做到,但我不推荐它。当用户期待另一件事时却给他们一件事很少是个好主意。 :D

You probably can do it, but I wouldn't reccomend it. Giving a user one thing when they expect another is seldom a good idea. :D

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文