124 references to Normal
System.Windows.Forms (33)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
238style |= ButtonState.Normal;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
178style |= ButtonState.Normal;
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (1)
285_ => ButtonState.Normal,
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (1)
266_ => ButtonState.Normal,
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (1)
275_ => ButtonState.Normal,
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (7)
40get => Properties.GetValueOrDefault(s_propButtonCellState, ButtonState.Normal); 45Debug.Assert((value & ~(ButtonState.Normal | ButtonState.Pushed | ButtonState.Checked)) == 0); 48Properties.AddOrRemoveValue(s_propButtonCellState, value, defaultValue: ButtonState.Normal); 503if (ButtonState != ButtonState.Normal) 506UpdateButtonState(ButtonState.Normal, rowIndex); 753(ButtonState == ButtonState.Normal) ? ButtonBorderStyle.Outset : ButtonBorderStyle.Inset); 934bool paintUp = (ButtonState == ButtonState.Normal);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (8)
182get => Properties.GetValueOrDefault(s_propButtonCellState, ButtonState.Normal); 187Debug.Assert((value & ~(ButtonState.Normal | ButtonState.Pushed | ButtonState.Checked)) == 0); 190Properties.AddOrRemoveValue(s_propButtonCellState, value, defaultValue: ButtonState.Normal); 853if (ButtonState != ButtonState.Normal) 856UpdateButtonState(ButtonState.Normal, rowIndex); 1082bs = (checkState == CheckState.Unchecked) ? ButtonState.Normal : ButtonState.Checked; 1095bs = ButtonState.Normal; 1101bs = ButtonState.Normal; // Default rendering of the checkbox with wrong formatted value type.
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
803if (ButtonState != ButtonState.Normal)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (7)
31get => Properties.GetValueOrDefault(s_propButtonState, ButtonState.Normal); 32private set => Properties.AddOrRemoveValue(s_propButtonState, value, defaultValue: ButtonState.Normal); 438DataGridView is not null && ButtonState != ButtonState.Normal && DataGridView.ApplyVisualStylesToHeaderCells; 469ButtonState == ButtonState.Normal && 489if (ButtonState != ButtonState.Normal) 494UpdateButtonState(ButtonState.Normal, rowIndex); 510UpdateButtonState(ButtonState.Normal, e.RowIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
681if (ButtonState != ButtonState.Normal)
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
248if (ButtonState != ButtonState.Normal)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
501ButtonState state = ButtonState.Normal;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (2)
309_pushed == ButtonID.Up ? ButtonState.Pushed : (Enabled ? ButtonState.Normal : ButtonState.Inactive)); 315_pushed == ButtonID.Down ? ButtonState.Pushed : (Enabled ? ButtonState.Normal : ButtonState.Inactive));
System.Windows.Forms.Design (2)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
574ControlPaint.DrawButton(g, button, ButtonState.Normal);
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (1)
201ControlPaint.DrawButton(e.Graphics, rc, ButtonState.Normal);
System.Windows.Forms.Tests (89)
System\Windows\Forms\ControlPaintTests.cs (37)
847[InlineData(ButtonState.Normal)] 856[InlineData(0, 4, ButtonState.Normal)] 858[InlineData(3, 0, ButtonState.Normal)] 860[InlineData(0, 0, ButtonState.Normal)] 871[InlineData(ButtonState.Normal)] 882[InlineData(ButtonState.Normal)] 931[InlineData(ButtonState.Normal)] 940[InlineData(0, 4, ButtonState.Normal)] 942[InlineData(3, 0, ButtonState.Normal)] 954[InlineData(ButtonState.Normal)] 965[InlineData(ButtonState.Normal)] 1011[InlineData(ButtonState.Normal)] 1020[InlineData(0, 4, ButtonState.Normal)] 1022[InlineData(3, 0, ButtonState.Normal)] 1024[InlineData(0, 0, ButtonState.Normal)] 1035[InlineData(ButtonState.Normal, "width")] 1046[InlineData(ButtonState.Normal, "height")] 1092[InlineData(ButtonState.Normal)] 1101[InlineData(0, 4, ButtonState.Normal)] 1103[InlineData(3, 0, ButtonState.Normal)] 1115[InlineData(ButtonState.Normal)] 1126[InlineData(ButtonState.Normal)] 1553[InlineData(ButtonState.Normal)] 1562[InlineData(0, 4, ButtonState.Normal)] 1564[InlineData(3, 0, ButtonState.Normal)] 1576[InlineData(ButtonState.Normal)] 1587[InlineData(ButtonState.Normal)] 1633[InlineData(ButtonState.Normal)] 1642[InlineData(0, 4, ButtonState.Normal)] 1644[InlineData(3, 0, ButtonState.Normal)] 1656[InlineData(ButtonState.Normal)] 1667[InlineData(ButtonState.Normal)] 1771[InlineData(ButtonState.Normal)] 1780[InlineData(0, 4, ButtonState.Normal)] 1782[InlineData(3, 0, ButtonState.Normal)] 1794[InlineData(ButtonState.Normal)] 1805[InlineData(ButtonState.Normal)]
System\Windows\Forms\DataGridViewHeaderCellTests.cs (52)
18Assert.Equal(ButtonState.Normal, cell.ButtonState); 3834Assert.Equal(ButtonState.Normal, cell.ButtonState); 3888Assert.Equal(ButtonState.Normal, cell.ButtonState); 3910Assert.Equal(ButtonState.Normal, cell.ButtonState); 3918Assert.Equal(ButtonState.Normal, cell.ButtonState); 3930Assert.Equal(ButtonState.Normal, cell.ButtonState); 3956Assert.Equal(ButtonState.Normal, cell.ButtonState); 3969Assert.Equal(ButtonState.Normal, cell.ButtonState); 3995Assert.Equal(ButtonState.Normal, cell.ButtonState); 4001ButtonState expected = VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.Normal; 4006yield return new object[] { false, -2, ButtonState.Normal }; 4007yield return new object[] { false, -1, ButtonState.Normal }; 4008yield return new object[] { false, 0, ButtonState.Normal }; 4009yield return new object[] { false, 1, ButtonState.Normal }; 4049Assert.Equal(ButtonState.Normal, cell.ButtonState); 4078Assert.Equal(ButtonState.Normal, cell.ButtonState); 4089Assert.Equal(ButtonState.Normal, cell.ButtonState); 4098Assert.Equal(ButtonState.Normal, cell.ButtonState); 4130Assert.Equal(ButtonState.Normal, cell.ButtonState); 4137yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4138yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4139yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4140yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4141yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4142yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4143yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4144yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4145yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4146yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4147yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4148yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4149yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4150yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4151yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4152yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4153yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4156yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.Normal }; 4212Assert.Equal(VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.Normal, cell.ButtonState); 4228Assert.Equal(ButtonState.Normal, cell.ButtonState); 4240Assert.Equal(ButtonState.Normal, cell.ButtonState); 4270Assert.Equal(ButtonState.Normal, cell.ButtonState); 4308Assert.Equal(ButtonState.Normal, cell.ButtonState); 4338Assert.Equal(ButtonState.Normal, cell.ButtonState); 4397Assert.Equal(ButtonState.Normal, cell.ButtonState); 4427Assert.Equal(ButtonState.Normal, cell.ButtonState); 4437Assert.Equal(ButtonState.Normal, cell.ButtonState); 4485Assert.Equal(ButtonState.Normal, cell.ButtonState); 4517ButtonState expectedButtonState1 = enableHeadersVisualStyles && VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.Normal; 4518ButtonState expectedButtonState2 = enableHeadersVisualStyles && VisualStyleRenderer.IsSupported ? ButtonState.Normal : expectedButtonState1; 4538yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.Normal }; 4595Assert.Equal(ButtonState.Normal, cell.ButtonState); 4611Assert.Equal(ButtonState.Normal, cell.ButtonState);