为什么 WPF CheckBox 中的 IsChecked 属性可以为空布尔值? [英] Why is IsChecked property nullable boolean in WPF CheckBox?

查看:27
本文介绍了为什么 WPF CheckBox 中的 IsChecked 属性可以为空布尔值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WPF CheckBox 上是否存在 IsChecked 属性为 null 的情况?

Is there a case when IsChecked property on WPF CheckBox null ?

我想这会从问题标题中回答我的问题.

I guess that will answer my question from title of question.

推荐答案

当你不知道它是否被选中时它为空:http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.togglebutton.ischecked.aspx

It is null when you don't know if its checked or not: http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.togglebutton.ischecked.aspx

在许多系统中,像这样的复选框被阴影化而不是被选中.

In many systems a checkbox like this is shaded instead of being checked.

这篇关于为什么 WPF CheckBox 中的 IsChecked 属性可以为空布尔值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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