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