65 references to Pushed
System.Windows.Forms (56)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
252
style |= ButtonState.
Pushed
;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
188
style |= ButtonState.
Pushed
;
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (1)
283
PushButtonState.Pressed => ButtonState.
Pushed
,
System\Windows\Forms\Controls\Buttons\ButtonState.cs (1)
41
All = Flat | Checked |
Pushed
| Inactive,
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (9)
258
CheckBoxState.CheckedPressed => (ButtonState.Checked | ButtonState.
Pushed
),
260
CheckBoxState.UncheckedPressed => ButtonState.
Pushed
,
264
CheckBoxState.MixedPressed => (ButtonState.Checked | ButtonState.
Pushed
),
273
if ((state & ButtonState.
Pushed
) == ButtonState.
Pushed
)
290
if ((state & ButtonState.
Pushed
) == ButtonState.
Pushed
)
308
if ((state & ButtonState.
Pushed
) == ButtonState.
Pushed
)
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (6)
271
RadioButtonState.CheckedPressed => ButtonState.Checked | ButtonState.
Pushed
,
273
RadioButtonState.UncheckedPressed => ButtonState.
Pushed
,
282
if ((state & ButtonState.
Pushed
) == ButtonState.
Pushed
)
300
if ((state & ButtonState.
Pushed
) == ButtonState.
Pushed
)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (16)
45
Debug.Assert((value & ~(ButtonState.Normal | ButtonState.
Pushed
| ButtonState.Checked)) == 0);
452
ButtonState.HasFlag(ButtonState.
Pushed
);
520
UpdateButtonState(ButtonState | ButtonState.
Pushed
, e.RowIndex);
542
if (ButtonState.HasFlag(ButtonState.
Pushed
) &&
546
UpdateButtonState(ButtonState & ~ButtonState.
Pushed
, rowIndex);
570
if (!ButtonState.HasFlag(ButtonState.
Pushed
) &&
574
UpdateButtonState(ButtonState | ButtonState.
Pushed
, e.RowIndex);
576
else if (ButtonState.HasFlag(ButtonState.
Pushed
) && !s_mouseInContentBounds)
578
UpdateButtonState(ButtonState & ~ButtonState.
Pushed
, e.RowIndex);
595
UpdateButtonState(ButtonState & ~ButtonState.
Pushed
, e.RowIndex);
724
if ((ButtonState & (ButtonState.
Pushed
| ButtonState.Checked)) != 0)
771
if ((ButtonState & (ButtonState.
Pushed
| ButtonState.Checked)) != 0)
802
if ((ButtonState & (ButtonState.
Pushed
| ButtonState.Checked)) != 0)
894
if ((ButtonState & (ButtonState.
Pushed
| ButtonState.Checked)) != 0 ||
929
if ((ButtonState & (ButtonState.
Pushed
| ButtonState.Checked)) != 0 ||
966
if ((ButtonState & (ButtonState.
Pushed
| ButtonState.Checked)) != 0 &&
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (13)
187
Debug.Assert((value & ~(ButtonState.Normal | ButtonState.
Pushed
| ButtonState.Checked)) == 0);
770
protected override bool MouseLeaveUnsharesRow(int rowIndex) => ButtonState.HasFlag(ButtonState.
Pushed
);
870
UpdateButtonState(ButtonState | ButtonState.
Pushed
, e.RowIndex);
892
if (ButtonState.HasFlag(ButtonState.
Pushed
) &&
896
UpdateButtonState(ButtonState & ~ButtonState.
Pushed
, rowIndex);
920
if (!ButtonState.HasFlag(ButtonState.
Pushed
) &&
924
UpdateButtonState(ButtonState | ButtonState.
Pushed
, e.RowIndex);
926
else if (ButtonState.HasFlag(ButtonState.
Pushed
) && !s_mouseInContentBounds)
928
UpdateButtonState(ButtonState & ~ButtonState.
Pushed
, e.RowIndex);
945
UpdateButtonState(ButtonState & ~ButtonState.
Pushed
, e.RowIndex);
1105
if ((ButtonState & (ButtonState.
Pushed
| ButtonState.Checked)) != 0)
1107
bs |= ButtonState.
Pushed
;
1389
if ((ButtonState & (ButtonState.
Pushed
| ButtonState.Checked)) != 0)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
805
Debug.Assert(ButtonState == ButtonState.
Pushed
);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (3)
454
UpdateButtonState(ButtonState.
Pushed
, e.RowIndex);
473
UpdateButtonState(ButtonState.
Pushed
, rowIndex);
491
Debug.Assert(ButtonState == ButtonState.
Pushed
);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
683
Debug.Assert(ButtonState == ButtonState.
Pushed
);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
250
Debug.Assert(ButtonState == ButtonState.
Pushed
);
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 (1)
System\Windows\Forms\Design\DockEditor.DockUI.cs (1)
302
ControlPaint.DrawButton(e.Graphics, rc, ButtonState.
Pushed
);
System.Windows.Forms.Tests (8)
System\Windows\Forms\DataGridViewHeaderCellTests.cs (8)
4001
ButtonState expected = VisualStyleRenderer.IsSupported ? ButtonState.
Pushed
: 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 };
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 };
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 };
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 };
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 };
4212
Assert.Equal(VisualStyleRenderer.IsSupported ? ButtonState.
Pushed
: ButtonState.Normal, cell.ButtonState);
4517
ButtonState expectedButtonState1 = enableHeadersVisualStyles && VisualStyleRenderer.IsSupported ? ButtonState.
Pushed
: ButtonState.Normal;