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);
1082
bs = (checkState == CheckState.Unchecked) ? ButtonState.
Normal
: ButtonState.Checked;
1095
bs = ButtonState.
Normal
;
1101
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)
681
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)
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)
18
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3834
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3888
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3910
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3918
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3930
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3956
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3969
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
3995
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4001
ButtonState expected = VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.
Normal
;
4006
yield return new object[] { false, -2, ButtonState.
Normal
};
4007
yield return new object[] { false, -1, ButtonState.
Normal
};
4008
yield return new object[] { false, 0, ButtonState.
Normal
};
4009
yield return new object[] { false, 1, ButtonState.
Normal
};
4049
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4078
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4089
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4098
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4130
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4137
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4138
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
};
4139
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4140
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4141
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
};
4142
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4143
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4144
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
};
4145
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4146
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4147
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
};
4148
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4149
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4150
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
};
4151
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4152
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.
Normal
};
4153
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.
Normal
};
4156
yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.
Normal
};
4212
Assert.Equal(VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.
Normal
, cell.ButtonState);
4228
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4240
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4270
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4308
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4338
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4397
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4427
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4437
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4485
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4517
ButtonState expectedButtonState1 = enableHeadersVisualStyles && VisualStyleRenderer.IsSupported ? ButtonState.Pushed : ButtonState.
Normal
;
4518
ButtonState expectedButtonState2 = enableHeadersVisualStyles && VisualStyleRenderer.IsSupported ? ButtonState.
Normal
: expectedButtonState1;
4538
yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.
Normal
};
4595
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);
4611
Assert.Equal(ButtonState.
Normal
, cell.ButtonState);