0
标题说明了它本身。对于VB,关键字Nothing
与False
相同。WPF/VB如何设置一个三态复选框(或可空布尔值)为Nothing(null)
此代码验证复选框是否为三态复选框,并且设置默认值indeterminate
如果是“三态”,则为false,如果不是。
myThreeStateChkbox.IsChecked = If(myThreeStateChkbox.IsThreeState, Nothing, False)
的结果是一样的,总是False
。我如何设置indeterminate
状态?
是的!它的工作原理,同时我找到了另一个解决方案,我把它作为一个替代方案写成'myThreeStateChkbox.IsChecked = If(myThreeStateChkbox.IsThreeState,DirectCast(Nothing,Boolean?),False)' – Baro