287 references to CheckState
PresentationUI (1)
MS\Internal\Documents\SigningDialog.Designer.cs (1)
120
_addDocPropCheckBox.CheckState = System.Windows.Forms.
CheckState
.Checked;
System.Windows.Forms (282)
_generated\1\Validation.cs (2)
105
public static void Validate(System.Windows.Forms.
CheckState
enumToValidate, string parameterName = "value")
109
ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.
CheckState
));
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (6)
37
PaintDown(e,
CheckState
.Unchecked);
41
PaintOver(e,
CheckState
.Unchecked);
45
PaintUp(e,
CheckState
.Unchecked);
64
internal abstract void PaintUp(PaintEventArgs e,
CheckState
state);
66
internal abstract void PaintDown(PaintEventArgs e,
CheckState
state);
68
internal abstract void PaintOver(PaintEventArgs e,
CheckState
state);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (25)
21
internal override void PaintUp(PaintEventArgs e,
CheckState
state)
28
|| (SystemInformation.HighContrast ? state !=
CheckState
.Indeterminate : state ==
CheckState
.Unchecked),
29
check: !hasCustomBorder && SystemInformation.HighContrast && state ==
CheckState
.Checked,
46
case
CheckState
.Checked:
49
case
CheckState
.Indeterminate:
58
case
CheckState
.Checked:
61
case
CheckState
.Indeterminate:
99
else if (state ==
CheckState
.Checked && SystemInformation.HighContrast)
104
else if (state ==
CheckState
.Indeterminate)
114
internal override void PaintDown(PaintEventArgs e,
CheckState
state)
121
|| (SystemInformation.HighContrast ? state !=
CheckState
.Indeterminate : state ==
CheckState
.Unchecked),
122
!hasCustomBorder && SystemInformation.HighContrast && state ==
CheckState
.Checked,
143
case
CheckState
.Unchecked:
144
case
CheckState
.Checked:
147
case
CheckState
.Indeterminate:
187
else if (state ==
CheckState
.Checked && SystemInformation.HighContrast)
192
else if (state ==
CheckState
.Indeterminate)
202
internal override void PaintOver(PaintEventArgs e,
CheckState
state)
214
up: !Control.FlatAppearance.CheckedBackColor.IsEmpty || state ==
CheckState
.Unchecked,
229
? state is
CheckState
.Checked or
CheckState
.Indeterminate
232
: state is
CheckState
.Indeterminate
276
else if (state ==
CheckState
.Unchecked)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (9)
13
internal override void PaintUp(PaintEventArgs e,
CheckState
state)
16
LayoutData layout = PaintPopupLayout(state ==
CheckState
.Unchecked, 1).Layout();
20
if (state ==
CheckState
.Indeterminate)
40
state !=
CheckState
.Indeterminate && IsHighContrastHighlighted() ? SystemColors.HighlightText : colors.WindowText,
49
if (state ==
CheckState
.Unchecked)
59
internal override void PaintOver(PaintEventArgs e,
CheckState
state)
62
LayoutData layout = PaintPopupLayout(state ==
CheckState
.Unchecked, SystemInformation.HighContrast ? 2 : 1).Layout();
66
if (state ==
CheckState
.Indeterminate)
117
internal override void PaintDown(PaintEventArgs e,
CheckState
state)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (6)
40
internal override void PaintUp(PaintEventArgs e,
CheckState
state) => PaintWorker(e, up: true, state);
42
internal override void PaintDown(PaintEventArgs e,
CheckState
state) => PaintWorker(e, up: false, state);
44
internal override void PaintOver(PaintEventArgs e,
CheckState
state) => PaintUp(e, state);
106
private void PaintWorker(PaintEventArgs e, bool up,
CheckState
state)
108
up = up && state ==
CheckState
.Unchecked;
130
if (state ==
CheckState
.Indeterminate)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (10)
62
if (Control.CheckState ==
CheckState
.Indeterminate)
84
CheckState
controlCheckState,
98
else if (controlCheckState ==
CheckState
.Indeterminate && checkBackground == SystemColors.Window && disabledColors)
126
if (Control.CheckState ==
CheckState
.Indeterminate)
151
CheckState
controlCheckState,
166
else if (controlCheckState ==
CheckState
.Indeterminate)
184
if (controlCheckState ==
CheckState
.Checked)
191
controlCheckState ==
CheckState
.Indeterminate,
236
if (Control.CheckState ==
CheckState
.Unchecked)
262
if (Control.CheckState ==
CheckState
.Indeterminate)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxFlatAdapter.cs (3)
12
internal override void PaintDown(PaintEventArgs e,
CheckState
state)
31
internal override void PaintOver(PaintEventArgs e,
CheckState
state)
50
internal override void PaintUp(PaintEventArgs e,
CheckState
state)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (3)
15
internal override void PaintUp(PaintEventArgs e,
CheckState
state)
50
internal override void PaintOver(PaintEventArgs e,
CheckState
state)
93
internal override void PaintDown(PaintEventArgs e,
CheckState
state)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxStandardAdapter.cs (3)
15
internal override void PaintUp(PaintEventArgs e,
CheckState
state)
64
internal override void PaintDown(PaintEventArgs e,
CheckState
state)
76
internal override void PaintOver(PaintEventArgs e,
CheckState
state)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeAdapter.cs (7)
73
internal override void PaintUp(PaintEventArgs e,
CheckState
state)
113
internal override void PaintDown(PaintEventArgs e,
CheckState
state)
151
internal override void PaintOver(PaintEventArgs e,
CheckState
state)
205
private static PushButtonState ToPushButtonState(
CheckState
state, bool enabled) =>
210
CheckState
.Unchecked => PushButtonState.Normal,
211
CheckState
.Checked => PushButtonState.Pressed,
212
CheckState
.Indeterminate => PushButtonState.Hot,
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonFlatAdapter.cs (9)
12
internal override void PaintDown(PaintEventArgs e,
CheckState
state)
17
adapter.PaintDown(e, Control.Checked ?
CheckState
.Checked :
CheckState
.Unchecked);
32
internal override void PaintOver(PaintEventArgs e,
CheckState
state)
37
adapter.PaintOver(e, Control.Checked ?
CheckState
.Checked :
CheckState
.Unchecked);
52
internal override void PaintUp(PaintEventArgs e,
CheckState
state)
57
adapter.PaintUp(e, Control.Checked ?
CheckState
.Checked :
CheckState
.Unchecked);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonPopupAdapter.cs (9)
10
internal override void PaintUp(PaintEventArgs e,
CheckState
state)
15
adapter.PaintUp(e, Control.Checked ?
CheckState
.Checked :
CheckState
.Unchecked);
39
internal override void PaintOver(PaintEventArgs e,
CheckState
state)
44
adapter.PaintOver(e, Control.Checked ?
CheckState
.Checked :
CheckState
.Unchecked);
64
internal override void PaintDown(PaintEventArgs e,
CheckState
state)
69
adapter.PaintDown(e, Control.Checked ?
CheckState
.Checked :
CheckState
.Unchecked);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonStandardAdapter.cs (9)
10
internal override void PaintUp(PaintEventArgs e,
CheckState
state)
14
ButtonAdapter.PaintUp(e, Control.Checked ?
CheckState
.Checked :
CheckState
.Unchecked);
29
internal override void PaintDown(PaintEventArgs e,
CheckState
state)
33
ButtonAdapter.PaintDown(e, Control.Checked ?
CheckState
.Checked :
CheckState
.Unchecked);
41
internal override void PaintOver(PaintEventArgs e,
CheckState
state)
45
ButtonAdapter.PaintOver(e, Control.Checked ?
CheckState
.Checked :
CheckState
.Unchecked);
System\Windows\Forms\Controls\Buttons\CheckBox.CheckBoxAccessibleObject.cs (9)
27
CheckState
.Checked => AccessibleStates.Checked | base.State,
28
CheckState
.Indeterminate => AccessibleStates.Indeterminate | base.State,
35
CheckState
.Checked => ToggleState.ToggleState_On,
36
CheckState
.Unchecked => ToggleState.ToggleState_Off,
83
CheckState
.Unchecked =>
CheckState
.Checked,
84
CheckState
.Checked =>
CheckState
.Indeterminate,
85
_ =>
CheckState
.Unchecked
System\Windows\Forms\Controls\Buttons\CheckBox.cs (12)
29
private
CheckState
_checkState;
172
get => _checkState !=
CheckState
.Unchecked;
177
CheckState = value ?
CheckState
.Checked :
CheckState
.Unchecked;
187
[DefaultValue(
CheckState
.Unchecked)]
190
public
CheckState
CheckState
459
case
CheckState
.Unchecked:
460
CheckState =
CheckState
.Checked;
462
case
CheckState
.Checked:
465
CheckState =
CheckState
.Indeterminate;
476
CheckState =
CheckState
.Unchecked;
481
CheckState =
CheckState
.Unchecked;
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (2)
913
if (type.Equals(typeof(bool)) || type.Equals(typeof(
CheckState
)))
915
dataGridViewColumn = new DataGridViewCheckBoxColumn(type.Equals(typeof(
CheckState
)));
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (61)
35
private static readonly Type s_defaultCheckStateType = typeof(
CheckState
);
69
if (value is
CheckState
valueAsCheckState)
71
if (valueAsCheckState ==
CheckState
.Checked)
76
else if (valueAsCheckState ==
CheckState
.Indeterminate)
139
return
CheckState
.Checked;
148
return
CheckState
.Indeterminate;
157
return
CheckState
.Unchecked;
329
private
CheckState
CheckState
337
if ((!EditingCellValueChanged && FormattedValue is
CheckState
checkState && checkState ==
CheckState
.Indeterminate) ||
340
return
CheckState
.Indeterminate;
343
if ((!EditingCellValueChanged && FormattedValue is
CheckState
checkState2 && checkState2 ==
CheckState
.Checked) ||
346
return
CheckState
.Checked;
352
return
CheckState
.Checked;
355
return
CheckState
.Unchecked;
564
value = (
CheckState
)intValue switch
566
CheckState
.Checked =>
CheckState
.Checked,
567
CheckState
.Unchecked =>
CheckState
.Unchecked,
568
CheckState
.Indeterminate =>
CheckState
.Indeterminate,
581
value =
CheckState
.Checked;
585
value =
CheckState
.Unchecked;
589
value =
CheckState
.Indeterminate;
614
else if (ret is
CheckState
retCheckState)
616
if (retCheckState ==
CheckState
.Checked)
620
else if (retCheckState ==
CheckState
.Unchecked)
626
Debug.Assert(retCheckState ==
CheckState
.Indeterminate);
957
CheckState
.Checked => string.Format(SR.DataGridViewCheckBoxCellCheckedStateDescription, cellName),
958
CheckState
.Unchecked => string.Format(SR.DataGridViewCheckBoxCellUncheckedStateDescription, cellName),
1077
CheckState
checkState;
1087
if (formattedValue is not null and
CheckState
state)
1090
bs = (checkState ==
CheckState
.Unchecked) ? ButtonState.Normal : ButtonState.Checked;
1091
drawAsMixedCheckBox = (checkState ==
CheckState
.Indeterminate);
1097
checkState =
CheckState
.Checked;
1102
checkState =
CheckState
.Unchecked;
1110
checkState =
CheckState
.Unchecked;
1331
if (checkState ==
CheckState
.Indeterminate)
1342
if (checkState !=
CheckState
.Unchecked)
1377
checkState ==
CheckState
.Indeterminate
1429
checkState is
CheckState
.Checked or
CheckState
.Indeterminate,
1479
checkState is
CheckState
.Checked or
CheckState
.Indeterminate,
1526
checkState is
CheckState
.Checked or
CheckState
.Indeterminate,
1589
return
CheckState
.Checked;
1604
return
CheckState
.Unchecked;
1608
else if (formattedValue is
CheckState
state)
1612
case
CheckState
.Checked:
1623
return
CheckState
.Checked;
1627
case
CheckState
.Unchecked:
1638
return
CheckState
.Unchecked;
1642
case
CheckState
.Indeterminate:
1649
return
CheckState
.Indeterminate;
1673
if (FormattedValueType.IsAssignableFrom(typeof(
CheckState
)))
1677
editingCell.EditingCellFormattedValue =
CheckState
.Indeterminate;
1681
editingCell.EditingCellFormattedValue =
CheckState
.Unchecked;
1685
editingCell.EditingCellFormattedValue =
CheckState
.Checked;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellAccessibleObject.cs (7)
35
CheckState
state => state switch
37
CheckState
.Checked => AccessibleStates.Checked | base.State,
38
CheckState
.Indeterminate => AccessibleStates.Indeterminate | base.State,
65
case
CheckState
checkState:
66
switchToCheckedState = checkState ==
CheckState
.Unchecked;
160
CheckState
.Checked => ToggleState.ToggleState_On,
161
CheckState
.Unchecked => ToggleState.ToggleState_Off,
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (5)
23
NullValue = threeState ?
CheckState
.Indeterminate : false
229
DefaultCellStyle.NullValue =
CheckState
.Indeterminate;
231
else if (!value && DefaultCellStyle.NullValue is
CheckState
state && state ==
CheckState
.Indeterminate)
291
defaultNullValue = templateCell.ThreeState ?
CheckState
.Indeterminate : false;
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedItemCollection.cs (7)
149
internal
CheckState
GetCheckedState(int index)
156
return
CheckState
.Indeterminate;
160
return
CheckState
.Checked;
163
return
CheckState
.Unchecked;
174
internal void SetCheckedState(int index,
CheckState
value)
181
case
CheckState
.Checked:
186
case
CheckState
.Indeterminate:
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedListBoxItemAccessibleObject.cs (5)
84
case
CheckState
.Checked:
87
case
CheckState
.Indeterminate:
90
case
CheckState
.Unchecked:
119
case
CheckState
.Checked:
122
case
CheckState
.Indeterminate:
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (15)
370
public
CheckState
GetItemCheckState(int index)
382
public bool GetItemChecked(int index) => GetItemCheckState(index) !=
CheckState
.Unchecked;
428
CheckState
currentValue = CheckedItems.GetCheckedState(index);
429
CheckState
newValue = (currentValue !=
CheckState
.Unchecked)
430
?
CheckState
.Unchecked
431
:
CheckState
.Checked;
511
case
CheckState
.Checked:
514
case
CheckState
.Indeterminate:
837
CheckState
[] savedCheckedItems = new
CheckState
[Items.Count];
857
public void SetItemCheckState(int index,
CheckState
value)
864
CheckState
currentValue = CheckedItems.GetCheckedState(index);
885
SetItemCheckState(index, value ?
CheckState
.Checked :
CheckState
.Unchecked);
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.ObjectCollection.cs (3)
23
return Add(item, isChecked ?
CheckState
.Checked :
CheckState
.Unchecked);
30
public int Add(object item,
CheckState
check)
System\Windows\Forms\Controls\ListView\ListView.cs (8)
6596
CheckState
oldState = (
CheckState
)(((int)((LIST_VIEW_ITEM_STATE_FLAGS)nmlv->uOldState & LIST_VIEW_ITEM_STATE_FLAGS.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1);
6597
CheckState
newState = (
CheckState
)(((int)((LIST_VIEW_ITEM_STATE_FLAGS)nmlv->uNewState & LIST_VIEW_ITEM_STATE_FLAGS.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1);
6618
CheckState
oldValue = (
CheckState
)(((int)((LIST_VIEW_ITEM_STATE_FLAGS)nmlv->uOldState & LIST_VIEW_ITEM_STATE_FLAGS.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1);
6619
CheckState
newValue = (
CheckState
)(((int)((LIST_VIEW_ITEM_STATE_FLAGS)nmlv->uNewState & LIST_VIEW_ITEM_STATE_FLAGS.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
66
internal override void PaintUp(PaintEventArgs pevent,
CheckState
state)
System\Windows\Forms\Controls\ToolStrips\ToolStripButton.cs (12)
13
private
CheckState
_checkState =
CheckState
.Unchecked;
14
private
CheckState
_prevCheckState =
CheckState
.Unchecked;
76
get => _checkState !=
CheckState
.Unchecked;
81
CheckState = value ?
CheckState
.Checked :
CheckState
.Unchecked;
91
[DefaultValue(
CheckState
.Unchecked)]
93
public
CheckState
CheckState
98
if (value is <
CheckState
.Unchecked or >
CheckState
.Indeterminate)
100
throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(
CheckState
));
System\Windows\Forms\Controls\ToolStrips\ToolStripButton.ToolStripButtonAccessibleObject.cs (5)
82
internal void OnCheckStateChanged(
CheckState
oldValue,
CheckState
newValue)
90
private static ToggleState CheckStateToToggleState(
CheckState
checkState)
93
CheckState
.Checked => ToggleState.ToggleState_On,
94
CheckState
.Unchecked => ToggleState.ToggleState_Off,
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (10)
255
get => CheckState !=
CheckState
.Unchecked;
260
CheckState = value ?
CheckState
.Checked :
CheckState
.Unchecked;
272
CheckState
.Indeterminate => t_indeterminateCheckedImage ??= ScaleHelper.GetIconResourceAsBitmap(
276
CheckState
.Checked => t_checkedImage ??= ScaleHelper.GetIconResourceAsBitmap(
297
[DefaultValue(
CheckState
.Unchecked)]
300
public
CheckState
CheckState
302
get => Properties.GetValueOrDefault(s_propCheckState,
CheckState
.Unchecked);
310
Properties.AddOrRemoveValue(s_propCheckState, value, defaultValue:
CheckState
.Unchecked);
974
if (CheckState !=
CheckState
.Unchecked && menuItemInternalLayout.PaintCheck)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemAccessibleObject.cs (2)
144
CheckState
.Checked => ToggleState.ToggleState_On,
145
CheckState
.Unchecked => ToggleState.ToggleState_Off,
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (3)
348
if (item is not null && item.CheckState ==
CheckState
.Unchecked)
659
else if (item is ToolStripMenuItem menuItem && menuItem.CheckState ==
CheckState
.Checked)
748
if (item is not null && item.CheckState !=
CheckState
.Unchecked)
System\Windows\Forms\Internal\Formatter.cs (10)
16
private static readonly Type s_checkStateType = typeof(
CheckState
);
116
return
CheckState
.Indeterminate;
176
return ((bool)value) ?
CheckState
.Checked :
CheckState
.Unchecked;
185
?
CheckState
.Checked
186
:
CheckState
.Unchecked;
319
else if (value is
CheckState
state)
321
if (state ==
CheckState
.Indeterminate)
329
return (state ==
CheckState
.Checked);
336
return targetConverter.ConvertFrom(context: null, GetFormatterCulture(formatInfo), state ==
CheckState
.Checked);
System\Windows\Forms\ItemCheckEventArgs.cs (4)
11
public ItemCheckEventArgs(int index,
CheckState
newCheckValue,
CheckState
currentValue)
26
public
CheckState
NewValue { get; set; }
31
public
CheckState
CurrentValue { get; }
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (2)
351
_visibleCheckBox.CheckState =
CheckState
.Checked;
818
if (type == typeof(bool) || type == typeof(
CheckState
))
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
633
else if (propType == typeof(bool) || propType == typeof(
CheckState
))
System\Windows\Forms\Design\MaskDesignerDialog.cs (1)
207
_checkBoxUseValidatingType.CheckState =
CheckState
.Checked;