带有“按钮”的WPF复选框出现 [英] WPF CheckBox with "Button" appearance

查看:608
本文介绍了带有“按钮”的WPF复选框出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个按钮样的控件,可以有一个Checked属性,所以,当点击它按下。



我有在WinForms的功能,

解决方案



/ div>

使用切换按钮,它具有您在CheckBox中看到的所有功能,因为它是派生自它。


I need a button-like control that can have a Checked property, so that when clicked it stays pressed.

I had that functionality in WinForms, with the CheckBox control, setting the Appearance property to "Button".

Can someone help me?

解决方案

Use a ToggleButton, it has all the functionality you see in a CheckBox since it is derived from it.

这篇关于带有“按钮”的WPF复选框出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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