124 references to Normal
System.Windows.Forms (33)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
238
style |= ButtonState.
Normal
;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
178
style |= 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)
40
get => Properties.GetValueOrDefault(s_propButtonCellState, ButtonState.
Normal
);
45
Debug.Assert((value & ~(ButtonState.
Normal
| ButtonState.Pushed | ButtonState.Checked)) == 0);
48
Properties.AddOrRemoveValue(s_propButtonCellState, value, defaultValue: ButtonState.
Normal
);
503
if (ButtonState != ButtonState.
Normal
)
506
UpdateButtonState(ButtonState.
Normal
, rowIndex);
753
(ButtonState == ButtonState.
Normal
) ? ButtonBorderStyle.Outset : ButtonBorderStyle.Inset);
934
bool paintUp = (ButtonState == ButtonState.
Normal
);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (8)
182
get => Properties.GetValueOrDefault(s_propButtonCellState, ButtonState.
Normal
);
187
Debug.Assert((value & ~(ButtonState.
Normal
| ButtonState.Pushed | ButtonState.Checked)) == 0);
190
Properties.AddOrRemoveValue(s_propButtonCellState, value, defaultValue: ButtonState.
Normal
);
853
if (ButtonState != ButtonState.
Normal
)
856
UpdateButtonState(ButtonState.
Normal
, rowIndex);
1090
bs = (checkState == CheckState.Unchecked) ? ButtonState.
Normal
: ButtonState.Checked;
1103
bs = ButtonState.
Normal
;
1109
bs = ButtonState.
Normal
; // Default rendering of the checkbox with wrong formatted value type.
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
803
if (ButtonState != ButtonState.
Normal
)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (7)
31
get => Properties.GetValueOrDefault(s_propButtonState, ButtonState.
Normal
);
32
private set => Properties.AddOrRemoveValue(s_propButtonState, value, defaultValue: ButtonState.
Normal
);
438
DataGridView is not null && ButtonState != ButtonState.
Normal
&& DataGridView.ApplyVisualStylesToHeaderCells;
469
ButtonState == ButtonState.
Normal
&&
489
if (ButtonState != ButtonState.
Normal
)
494
UpdateButtonState(ButtonState.
Normal
, rowIndex);
510
UpdateButtonState(ButtonState.
Normal
, e.RowIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
685
if (ButtonState != ButtonState.
Normal
)
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
248
if (ButtonState != ButtonState.
Normal
)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
501
ButtonState 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)
574
ControlPaint.DrawButton(g, button, ButtonState.
Normal
);
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (1)
201
ControlPaint.DrawButton(e.Graphics, rc, ButtonState.
Normal
);
System.Windows.Forms.Tests (89)
System\Windows\Forms\ControlPaintTests.cs (37)
849
[InlineData(ButtonState.
Normal
)]
858
[InlineData(0, 4, ButtonState.
Normal
)]
860
[InlineData(3, 0, ButtonState.
Normal
)]
862
[InlineData(0, 0, ButtonState.
Normal
)]
873
[InlineData(ButtonState.
Normal
)]
884
[InlineData(ButtonState.
Normal
)]
933
[InlineData(ButtonState.
Normal
)]
942
[InlineData(0, 4, ButtonState.
Normal
)]
944
[InlineData(3, 0, ButtonState.
Normal
)]
956
[InlineData(ButtonState.
Normal
)]
967
[InlineData(ButtonState.
Normal
)]
1013
[InlineData(ButtonState.
Normal
)]
1022
[InlineData(0, 4, ButtonState.
Normal
)]
1024
[InlineData(3, 0, ButtonState.
Normal
)]
1026
[InlineData(0, 0, ButtonState.
Normal
)]
1037
[InlineData(ButtonState.
Normal
, "width")]
1048
[InlineData(ButtonState.
Normal
, "height")]
1094
[InlineData(ButtonState.
Normal
)]
1103
[InlineData(0, 4, ButtonState.
Normal
)]
1105
[InlineData(3, 0, ButtonState.
Normal
)]
1117
[InlineData(ButtonState.
Normal
)]
1128
[InlineData(ButtonState.
Normal
)]
1555
[InlineData(ButtonState.
Normal
)]
1564
[InlineData(0, 4, ButtonState.
Normal
)]
1566
[InlineData(3, 0, ButtonState.
Normal
)]
1578
[InlineData(ButtonState.
Normal
)]
1589
[InlineData(ButtonState.
Normal
)]
1635
[InlineData(ButtonState.
Normal
)]
1644
[InlineData(0, 4, ButtonState.
Normal
)]
1646
[InlineData(3, 0, ButtonState.
Normal
)]
1658
[InlineData(ButtonState.
Normal
)]
1669
[InlineData(ButtonState.
Normal
)]
1773
[InlineData(ButtonState.
Normal
)]
1782
[InlineData(0, 4, ButtonState.
Normal
)]
1784
[InlineData(3, 0, ButtonState.
Normal
)]
1796
[InlineData(ButtonState.
Normal
)]
1807
[InlineData(ButtonState.
Normal
)]
System\Windows\Forms\DataGridViewHeaderCellTests.cs (52)
20
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3836
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3890
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3912
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3920
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3932
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3958
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3971
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3997
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4003
ButtonState expected = VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.
Normal
;
4008
yield return new object[] { false, -2, ButtonState.
Normal
};
4009
yield return new object[] { false, -1, ButtonState.
Normal
};
4010
yield return new object[] { false, 0, ButtonState.
Normal
};
4011
yield return new object[] { false, 1, ButtonState.
Normal
};
4051
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4080
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4091
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4100
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4132
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4139
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4140
yield 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
};
4141
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4142
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4143
yield 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
};
4144
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4145
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4146
yield 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
};
4147
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4148
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4149
yield 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
};
4150
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4151
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4152
yield 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
};
4153
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4154
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4155
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4158
yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.
Normal
};
4214
Assert.Equal(VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.
Normal
, cell.ButtonState);
4230
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4242
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4272
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4310
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4340
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4399
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4429
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4439
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4487
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4519
ButtonState expectedButtonState1 = enableHeadersVisualStyles && VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.
Normal
;
4520
ButtonState expectedButtonState2 = enableHeadersVisualStyles && VisualStyleRenderer.IsSupported ? ButtonState.
Normal
: expectedButtonState1;
4540
yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.
Normal
};
4597
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4613
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);