268 references to CheckState
System.Web.Entity.Design (1)
System\Data\WebControls\Design\EntityDataSourceDataSelectionPanel.cs (1)
198if (e.NewValue == CheckState.Checked)
System.Windows.Forms (267)
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (6)
44PaintDown(pevent, CheckState.Unchecked); 47PaintOver(pevent, CheckState.Unchecked); 50PaintUp(pevent, CheckState.Unchecked); 66internal abstract void PaintUp(PaintEventArgs e, CheckState state); 68internal abstract void PaintDown(PaintEventArgs e, CheckState state); 70internal abstract void PaintOver(PaintEventArgs e, CheckState state);
winforms\Managed\System\WinForms\ButtonInternal\ButtonFlatAdapter.cs (25)
31internal override void PaintUp(PaintEventArgs e, CheckState state) { 36!Control.FlatAppearance.CheckedBackColor.IsEmpty || (SystemInformation.HighContrast ? state != CheckState.Indeterminate : state == CheckState.Unchecked), 37!hasCustomBorder && SystemInformation.HighContrast && state == CheckState.Checked, 55case CheckState.Checked: 58case CheckState.Indeterminate: 65case CheckState.Checked: 68case CheckState.Indeterminate: 101else if (state == CheckState.Checked && SystemInformation.HighContrast) { 105else if (state == CheckState.Indeterminate) { 113internal override void PaintDown(PaintEventArgs e, CheckState state) { 118!Control.FlatAppearance.CheckedBackColor.IsEmpty || (SystemInformation.HighContrast ? state != CheckState.Indeterminate : state == CheckState.Unchecked), 119!hasCustomBorder && SystemInformation.HighContrast && state == CheckState.Checked, 139case CheckState.Unchecked: 140case CheckState.Checked: 143case CheckState.Indeterminate: 175else if (state == CheckState.Checked && SystemInformation.HighContrast) { 179else if (state == CheckState.Indeterminate) { 187internal override void PaintOver(PaintEventArgs e, CheckState state) { 196!Control.FlatAppearance.CheckedBackColor.IsEmpty || state == CheckState.Unchecked, 217if (state == CheckState.Checked || state == CheckState.Indeterminate) { 225if (state == CheckState.Indeterminate) { 259else if (state == CheckState.Unchecked) {
winforms\Managed\System\WinForms\ButtonInternal\ButtonPopupAdapter.cs (9)
24internal override void PaintUp(PaintEventArgs e, CheckState state) { 26LayoutData layout = PaintPopupLayout(e, state == CheckState.Unchecked, 1).Layout(); 32if (state == CheckState.Indeterminate) { 51PaintField(e, layout, colors, state != CheckState.Indeterminate && IsHighContrastHighlighted2() ? SystemColors.HighlightText : colors.windowText, true); 55if (state == CheckState.Unchecked) { 63internal override void PaintOver(PaintEventArgs e, CheckState state) { 65LayoutData layout = PaintPopupLayout(e, state == CheckState.Unchecked, SystemInformation.HighContrast ? 2 : 1).Layout(); 72if (state == CheckState.Indeterminate) { 124internal override void PaintDown(PaintEventArgs e, CheckState state) {
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (6)
50internal override void PaintUp(PaintEventArgs e, CheckState state) { 54internal override void PaintDown(PaintEventArgs e, CheckState state) { 58internal override void PaintOver(PaintEventArgs e, CheckState state) { 131void PaintWorker(PaintEventArgs e, bool up, CheckState state) { 132up = up && state == CheckState.Unchecked; 155if (state == CheckState.Indeterminate) {
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (10)
65if (Control.CheckState == CheckState.Indeterminate) { 85internal static void DrawCheckBackground(bool controlEnabled, CheckState controlCheckState, Graphics g, Rectangle bounds, Color checkColor, Color checkBackground, bool disabledColors, ColorData colors) 92else if (controlCheckState == CheckState.Indeterminate && checkBackground == SystemColors.Window && disabledColors) { 118if (Control.CheckState == CheckState.Indeterminate) { 131internal static void DrawCheckOnly(int checkSize, bool controlChecked, bool controlEnabled, CheckState controlCheckState, Graphics g, LayoutData layout, ColorData colors, Color checkColor, Color checkBackground) { 139else if (controlCheckState == CheckState.Indeterminate) { 155if (controlCheckState == CheckState.Checked) { 158Debug.Assert(controlCheckState == CheckState.Indeterminate, "we want to paint the check box only if the item is checked or indeterminate"); 197if (Control.CheckState == CheckState.Unchecked) { 220if (Control.CheckState == CheckState.Indeterminate) {
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxFlatAdapter.cs (3)
20internal override void PaintDown(PaintEventArgs e, CheckState state) { 35internal override void PaintOver(PaintEventArgs e, CheckState state) { 50internal override void PaintUp(PaintEventArgs e, CheckState state) {
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxPopupAdapter.cs (3)
23internal override void PaintUp(PaintEventArgs e, CheckState state) { 48internal override void PaintOver(PaintEventArgs e, CheckState state) { 77internal override void PaintDown(PaintEventArgs e, CheckState state) {
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxStandardAdapter.cs (3)
21internal override void PaintUp(PaintEventArgs e, CheckState state) 60internal override void PaintDown(PaintEventArgs e, CheckState state) { 69internal override void PaintOver(PaintEventArgs e, CheckState state) {
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonFlatAdapter.cs (9)
22internal override void PaintDown(PaintEventArgs e, CheckState state) { 25adapter.PaintDown(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked); 38internal override void PaintOver(PaintEventArgs e, CheckState state) { 41adapter.PaintOver(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked); 54internal override void PaintUp(PaintEventArgs e, CheckState state) { 57adapter.PaintUp(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked);
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonPopupAdapter.cs (9)
20internal override void PaintUp(PaintEventArgs e, CheckState state) { 24adapter.PaintUp(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked); 42internal override void PaintOver(PaintEventArgs e, CheckState state) { 46adapter.PaintOver(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked); 65internal override void PaintDown(PaintEventArgs e, CheckState state) { 69adapter.PaintDown(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked);
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonStandardAdapter.cs (9)
20internal override void PaintUp(PaintEventArgs e, CheckState state) { 22ButtonAdapter.PaintUp(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked); 36internal override void PaintDown(PaintEventArgs e, CheckState state) { 38ButtonAdapter.PaintDown(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked); 45internal override void PaintOver(PaintEventArgs e, CheckState state) { 47ButtonAdapter.PaintOver(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked);
winforms\Managed\System\WinForms\CheckBox.cs (17)
55private CheckState checkState; 228return checkState != CheckState.Unchecked; 233CheckState = value ? CheckState.Checked : CheckState.Unchecked; 246DefaultValue(CheckState.Unchecked), 250public CheckState CheckState { 257if (!ClientUtils.IsEnumValid(value, (int)value, (int)CheckState.Unchecked, (int)CheckState.Indeterminate)){ 258throw new InvalidEnumArgumentException("value", (int)value, typeof(CheckState)); 569case CheckState.Unchecked: 570CheckState = CheckState.Checked; 572case CheckState.Checked: 574CheckState = CheckState.Indeterminate; 585CheckState = CheckState.Unchecked; 589CheckState = CheckState.Unchecked; 766case CheckState.Checked: 768case CheckState.Indeterminate:
winforms\Managed\System\WinForms\CheckedListBox.cs (33)
526public CheckState GetItemCheckState(int index) { 539return(GetItemCheckState(index) != CheckState.Unchecked); 586CheckState currentValue = CheckedItems.GetCheckedState(index); 587CheckState newValue = (currentValue != CheckState.Unchecked) 588? CheckState.Unchecked 589: CheckState.Checked; 669case CheckState.Checked: 672case CheckState.Indeterminate: 981CheckedItems.SetCheckedState(j, (CheckState)savedcheckedItems[j]); 990public void SetItemCheckState(int index, CheckState value) { 995if (!ClientUtils.IsEnumValid(value,(int)value, (int)CheckState.Unchecked, (int)CheckState.Indeterminate)){ 996throw new InvalidEnumArgumentException("value", (int)value, typeof(CheckState)); 998CheckState currentValue = CheckedItems.GetCheckedState(index); 1017SetItemCheckState(index, value ? CheckState.Checked : CheckState.Unchecked); 1142return Add(item, isChecked ? CheckState.Checked : CheckState.Unchecked); 1150public int Add(object item, CheckState check) { 1155if (!ClientUtils.IsEnumValid(check, (int)check, (int)CheckState.Unchecked, (int)CheckState.Indeterminate)){ 1156throw new InvalidEnumArgumentException("value", (int)check, typeof(CheckState)); 1498internal CheckState GetCheckedState(int index) { 1503return CheckState.Indeterminate; 1506return CheckState.Checked; 1509return CheckState.Unchecked; 1523internal void SetCheckedState(int index, CheckState value) { 1528case CheckState.Checked: 1533case CheckState.Indeterminate: 1724case CheckState.Checked: 1727case CheckState.Indeterminate: 1730case CheckState.Unchecked:
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (63)
51private static Type defaultCheckStateType = typeof(System.Windows.Forms.CheckState); 88if (value is System.Windows.Forms.CheckState) 90if (((System.Windows.Forms.CheckState)value) == System.Windows.Forms.CheckState.Checked) 95else if (((System.Windows.Forms.CheckState)value) == System.Windows.Forms.CheckState.Indeterminate) 161return System.Windows.Forms.CheckState.Checked; 169return System.Windows.Forms.CheckState.Indeterminate; 177return System.Windows.Forms.CheckState.Unchecked; 649(value is int && (int)value == (int)CheckState.Checked)) 651value = CheckState.Checked; 654(value is int && (int)value == (int)CheckState.Unchecked)) 656value = CheckState.Unchecked; 659(value is int && (int)value == (int)CheckState.Indeterminate)) 661value = CheckState.Indeterminate; 726else if (ret is CheckState) 728CheckState retCheckState = (CheckState) ret; 729if (retCheckState == CheckState.Checked) 733else if (retCheckState == CheckState.Unchecked) 739Debug.Assert(retCheckState == CheckState.Indeterminate); 1179CheckState checkState; 1188if (formattedValue != null && formattedValue is CheckState) 1190checkState = (CheckState)formattedValue; 1191bs = (checkState == CheckState.Unchecked) ? ButtonState.Normal : ButtonState.Checked; 1192drawAsMixedCheckBox = (checkState == CheckState.Indeterminate); 1198checkState = CheckState.Checked; 1203checkState = CheckState.Unchecked; 1211checkState = CheckState.Unchecked; 1404if (checkState == CheckState.Indeterminate) 1417if (checkState != CheckState.Unchecked) 1453ControlPaint.DrawImageColorized(g, checkImage, fullSize, checkState == CheckState.Indeterminate ? ControlPaint.LightLight(foreBrush.Color) : foreBrush.Color); 1502checkState == CheckState.Checked || checkState == CheckState.Indeterminate, 1549checkState == CheckState.Checked || checkState == CheckState.Indeterminate, 1594checkState == CheckState.Checked || checkState == CheckState.Indeterminate, 1657return CheckState.Checked; 1672return CheckState.Unchecked; 1676else if (formattedValue is CheckState) 1678switch ((CheckState) formattedValue) 1680case CheckState.Checked: 1691return CheckState.Checked; 1694case CheckState.Unchecked: 1705return CheckState.Unchecked; 1708case CheckState.Indeterminate: 1715return CheckState.Indeterminate; 1735if (this.FormattedValueType.IsAssignableFrom(typeof(System.Windows.Forms.CheckState))) 1739editingCell.EditingCellFormattedValue = System.Windows.Forms.CheckState.Indeterminate; 1743editingCell.EditingCellFormattedValue = System.Windows.Forms.CheckState.Unchecked; 1747editingCell.EditingCellFormattedValue = System.Windows.Forms.CheckState.Checked; 1815if (((DataGridViewCheckBoxCell)Owner).EditedFormattedValue is CheckState) 1817CheckState state = (CheckState)(((DataGridViewCheckBoxCell)Owner).EditedFormattedValue); 1820case CheckState.Checked: 1822case CheckState.Indeterminate: 1851if (formattedValue is System.Windows.Forms.CheckState) 1853switchToCheckedState = ((CheckState) formattedValue) == CheckState.Unchecked; 1975if (formattedValue is System.Windows.Forms.CheckState) { 1976toggledState = ((CheckState)formattedValue) == CheckState.Checked;
winforms\Managed\System\WinForms\DataGridViewCheckBoxColumn.cs (6)
37defaultCellStyle.NullValue = CheckState.Indeterminate; 259this.DefaultCellStyle.NullValue = CheckState.Indeterminate; 262this.DefaultCellStyle.NullValue is CheckState && 263(CheckState) this.DefaultCellStyle.NullValue == CheckState.Indeterminate) 324defaultNullValue = CheckState.Indeterminate;
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (2)
999if (type.Equals(typeof(bool)) || type.Equals(typeof(CheckState))) 1001dataGridViewColumn = new DataGridViewCheckBoxColumn(type.Equals(typeof(CheckState)));
winforms\Managed\System\WinForms\Formatter.cs (12)
20static private Type checkStateType = typeof(CheckState); 114return CheckState.Indeterminate; 147return ((bool)value) ? CheckState.Checked : CheckState.Unchecked; 155? CheckState.Checked : CheckState.Unchecked; 293else if (value is CheckState) { 294CheckState state = (CheckState)value; 295if (state == CheckState.Indeterminate) { 300return (state == CheckState.Checked); 306return targetConverter.ConvertFrom(null, GetFormatterCulture(formatInfo), state == CheckState.Checked);
winforms\Managed\System\WinForms\ItemCheckEvent.cs (6)
28CheckState newValue; 29readonly CheckState currentValue; 35public ItemCheckEventArgs(int index, CheckState newCheckValue, CheckState currentValue) { 52public CheckState NewValue { 61public CheckState CurrentValue {
winforms\Managed\System\WinForms\ListView.cs (8)
5887CheckState oldState = (CheckState)(((nmlv->uOldState & NativeMethods.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1); 5888CheckState newState = (CheckState)(((nmlv->uNewState & NativeMethods.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1); 5905CheckState oldValue = (CheckState)(((nmlv->uOldState & NativeMethods.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1); 5906CheckState newValue = (CheckState)(((nmlv->uNewState & NativeMethods.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1);
winforms\Managed\System\WinForms\PropertyGridInternal\DropDownButton.cs (1)
196internal override void PaintUp(PaintEventArgs pevent, CheckState state) {
winforms\Managed\System\WinForms\ToolStripButton.cs (10)
21private CheckState checkState = CheckState.Unchecked; 102return checkState != CheckState.Unchecked; 107CheckState = value ? CheckState.Checked : CheckState.Unchecked; 121DefaultValue(CheckState.Unchecked), 124public CheckState CheckState { 131if (!ClientUtils.IsEnumValid(value, (int)value, (int)CheckState.Unchecked, (int)CheckState.Indeterminate)) 133throw new InvalidEnumArgumentException("value", (int)value, typeof(CheckState));
winforms\Managed\System\WinForms\ToolStripHighContrastRenderer.cs (1)
395if (button.CheckState == CheckState.Checked) {
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (14)
257return CheckState != CheckState.Unchecked; 262CheckState = value ? CheckState.Checked : CheckState.Unchecked; 277CheckState checkedState = CheckState; 279if (checkedState == CheckState.Indeterminate) { 298else if (checkedState == CheckState.Checked) { 384DefaultValue(CheckState.Unchecked), 388public CheckState CheckState { 392return (found) ? (CheckState)checkState : CheckState.Unchecked; 397if (!ClientUtils.IsEnumValid(value, (int)value, (int)CheckState.Unchecked, (int)CheckState.Indeterminate)) 399throw new InvalidEnumArgumentException("value", (int)value, typeof(CheckState)); 1086if (CheckState != CheckState.Unchecked && menuItemInternalLayout.PaintCheck) {
winforms\Managed\System\WinForms\ToolStripProfessionalRenderer.cs (2)
316if (item.CheckState == CheckState.Unchecked) { 657if (item.CheckState != CheckState.Unchecked) {