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