208 references to ButtonState
System.Windows.Forms (197)
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (8)
194
protected
ButtonState
GetState() {
195
ButtonState
style = (
ButtonState
)0;
198
style |=
ButtonState
.Normal;
201
style |=
ButtonState
.Checked;
205
style |=
ButtonState
.Inactive;
209
style |=
ButtonState
.Pushed;
218
ButtonState
style = GetState();
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonBaseAdapter.cs (8)
155
protected
ButtonState
GetState() {
156
ButtonState
style = (
ButtonState
)0;
159
style |=
ButtonState
.Checked;
162
style |=
ButtonState
.Normal;
166
style |=
ButtonState
.Inactive;
170
style |=
ButtonState
.Pushed;
185
ButtonState
style = GetState();
winforms\Managed\System\WinForms\ButtonRenderer.cs (4)
257
internal static
ButtonState
ConvertToButtonState(PushButtonState state) {
261
return
ButtonState
.Pushed;
263
return
ButtonState
.Inactive;
266
return
ButtonState
.Normal;
winforms\Managed\System\WinForms\CheckBoxRenderer.cs (29)
244
internal static
ButtonState
ConvertToButtonState(CheckBoxState state) {
249
return
ButtonState
.Checked;
251
return (
ButtonState
.Checked |
ButtonState
.Pushed);
253
return (
ButtonState
.Checked |
ButtonState
.Inactive);
256
return
ButtonState
.Pushed;
258
return
ButtonState
.Inactive;
263
return
ButtonState
.Checked;
265
return (
ButtonState
.Checked |
ButtonState
.Pushed);
267
return (
ButtonState
.Checked |
ButtonState
.Inactive);
270
return
ButtonState
.Normal;
274
internal static CheckBoxState ConvertFromButtonState(
ButtonState
state, bool isMixed, bool isHot) {
276
if ((state &
ButtonState
.Pushed) ==
ButtonState
.Pushed) {
279
else if ((state &
ButtonState
.Inactive) ==
ButtonState
.Inactive) {
288
else if ((state &
ButtonState
.Checked) ==
ButtonState
.Checked) {
289
if ((state &
ButtonState
.Pushed) ==
ButtonState
.Pushed) {
292
else if ((state &
ButtonState
.Inactive) ==
ButtonState
.Inactive) {
302
if ((state &
ButtonState
.Pushed) ==
ButtonState
.Pushed) {
305
else if ((state &
ButtonState
.Inactive) ==
ButtonState
.Inactive) {
winforms\Managed\System\WinForms\CheckedListBox.cs (6)
663
ButtonState
state =
ButtonState
.Normal;
665
state |=
ButtonState
.Flat;
670
state |=
ButtonState
.Checked;
673
state |=
ButtonState
.Checked |
ButtonState
.Inactive;
winforms\Managed\System\WinForms\ControlPaint.cs (24)
1111
public static void DrawButton(Graphics graphics, Rectangle rectangle,
ButtonState
state) {
1119
public static void DrawButton(Graphics graphics, int x, int y, int width, int height,
ButtonState
state) {
1128
public static void DrawCaptionButton(Graphics graphics, Rectangle rectangle, CaptionButton button,
ButtonState
state) {
1136
public static void DrawCaptionButton(Graphics graphics, int x, int y, int width, int height, CaptionButton button,
ButtonState
state) {
1146
public static void DrawCheckBox(Graphics graphics, Rectangle rectangle,
ButtonState
state) {
1154
public static void DrawCheckBox(Graphics graphics, int x, int y, int width, int height,
ButtonState
state) {
1156
if ((state &
ButtonState
.Flat) ==
ButtonState
.Flat) {
1169
public static void DrawComboButton(Graphics graphics, Rectangle rectangle,
ButtonState
state) {
1177
public static void DrawComboButton(Graphics graphics, int x, int y, int width, int height,
ButtonState
state) {
1232
private static void DrawFlatCheckBox(Graphics graphics, Rectangle rectangle,
ButtonState
state) {
1238
Brush background = ((state &
ButtonState
.Inactive) ==
ButtonState
.Inactive) ?
1241
Color foreground = ((state &
ButtonState
.Inactive) ==
ButtonState
.Inactive) ?
1254
private static void DrawFlatCheckBox(Graphics graphics, Rectangle rectangle, Color foreground, Brush background,
ButtonState
state) {
1268
if ((state &
ButtonState
.Checked) ==
ButtonState
.Checked) {
1732
public static void DrawMixedCheckBox(Graphics graphics, Rectangle rectangle,
ButtonState
state) {
1740
public static void DrawMixedCheckBox(Graphics graphics, int x, int y, int width, int height,
ButtonState
state) {
1749
public static void DrawRadioButton(Graphics graphics, Rectangle rectangle,
ButtonState
state) {
1757
public static void DrawRadioButton(Graphics graphics, int x, int y, int width, int height,
ButtonState
state) {
1848
public static void DrawScrollButton(Graphics graphics, Rectangle rectangle, ScrollButton button,
ButtonState
state) {
1856
public static void DrawScrollButton(Graphics graphics, int x, int y, int width, int height, ScrollButton button,
ButtonState
state) {
winforms\Managed\System\WinForms\DataGridBoolColumn.cs (6)
384
ButtonState
checkedState =
ButtonState
.Inactive;
386
checkedState = ((bool)value ?
ButtonState
.Checked :
ButtonState
.Normal);
402
if (checkedState ==
ButtonState
.Inactive) {
403
ControlPaint.DrawMixedCheckBox(g, box,
ButtonState
.Checked);
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (34)
49
private
ButtonState
ButtonState
57
return (
ButtonState
)buttonState;
59
return
ButtonState
.Normal;
65
Debug.Assert((value & ~(
ButtonState
.Normal |
ButtonState
.Pushed |
ButtonState
.Checked)) == 0);
497
return (this.ButtonState &
ButtonState
.Pushed) != 0;
515
UpdateButtonState(this.ButtonState |
ButtonState
.Checked, rowIndex);
529
UpdateButtonState(this.ButtonState & ~
ButtonState
.Checked, rowIndex);
551
if (this.ButtonState !=
ButtonState
.Normal)
554
UpdateButtonState(
ButtonState
.Normal, rowIndex);
568
UpdateButtonState(this.ButtonState |
ButtonState
.Pushed, e.RowIndex);
591
if ((this.ButtonState &
ButtonState
.Pushed) != 0 &&
595
UpdateButtonState(this.ButtonState & ~
ButtonState
.Pushed, rowIndex);
620
if ((this.ButtonState &
ButtonState
.Pushed) == 0 &&
624
UpdateButtonState(this.ButtonState |
ButtonState
.Pushed, e.RowIndex);
626
else if ((this.ButtonState &
ButtonState
.Pushed) != 0 && !mouseInContentBounds)
628
UpdateButtonState(this.ButtonState & ~
ButtonState
.Pushed, e.RowIndex);
645
UpdateButtonState(this.ButtonState & ~
ButtonState
.Pushed, e.RowIndex);
766
if ((this.ButtonState & (
ButtonState
.Pushed |
ButtonState
.Checked)) != 0)
793
(this.ButtonState ==
ButtonState
.Normal) ? ButtonBorderStyle.Outset : ButtonBorderStyle.Inset);
809
if ((this.ButtonState & (
ButtonState
.Pushed |
ButtonState
.Checked)) != 0)
871
if ((this.ButtonState & (
ButtonState
.Pushed |
ButtonState
.Checked)) != 0)
948
if ((this.ButtonState & (
ButtonState
.Pushed |
ButtonState
.Checked)) != 0 ||
980
if ((this.ButtonState & (
ButtonState
.Pushed |
ButtonState
.Checked)) != 0 ||
985
bool paintUp = (this.ButtonState ==
ButtonState
.Normal);
1017
if ((this.ButtonState & (
ButtonState
.Pushed |
ButtonState
.Checked)) != 0 &&
1066
private void UpdateButtonState(
ButtonState
newButtonState, int rowIndex)
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (31)
200
private
ButtonState
ButtonState
208
return (
ButtonState
)buttonState;
210
return
ButtonState
.Normal;
216
Debug.Assert((value & ~(
ButtonState
.Normal |
ButtonState
.Pushed |
ButtonState
.Checked)) == 0);
892
return (this.ButtonState &
ButtonState
.Pushed) != 0;
946
UpdateButtonState(this.ButtonState |
ButtonState
.Checked, rowIndex);
960
UpdateButtonState(this.ButtonState & ~
ButtonState
.Checked, rowIndex);
983
if (this.ButtonState !=
ButtonState
.Normal)
986
UpdateButtonState(
ButtonState
.Normal, rowIndex);
1000
UpdateButtonState(this.ButtonState |
ButtonState
.Pushed, e.RowIndex);
1023
if ((this.ButtonState &
ButtonState
.Pushed) != 0 &&
1027
UpdateButtonState(this.ButtonState & ~
ButtonState
.Pushed, rowIndex);
1052
if ((this.ButtonState &
ButtonState
.Pushed) == 0 &&
1056
UpdateButtonState(this.ButtonState |
ButtonState
.Pushed, e.RowIndex);
1058
else if ((this.ButtonState &
ButtonState
.Pushed) != 0 && !mouseInContentBounds)
1060
UpdateButtonState(this.ButtonState & ~
ButtonState
.Pushed, e.RowIndex);
1077
UpdateButtonState(this.ButtonState & ~
ButtonState
.Pushed, e.RowIndex);
1180
ButtonState
bs;
1191
bs = (checkState == CheckState.Unchecked) ?
ButtonState
.Normal :
ButtonState
.Checked;
1199
bs =
ButtonState
.Checked;
1204
bs =
ButtonState
.Normal;
1210
bs =
ButtonState
.Normal; // Default rendering of the checkbox with wrong formatted value type.
1213
if ((this.ButtonState & (
ButtonState
.Pushed |
ButtonState
.Checked)) != 0)
1215
bs |=
ButtonState
.Pushed;
1468
if ((this.ButtonState & (
ButtonState
.Pushed |
ButtonState
.Checked)) != 0)
1767
private void UpdateButtonState(
ButtonState
newButtonState, int rowIndex)
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (2)
831
if (this.ButtonState !=
ButtonState
.Normal)
833
Debug.Assert(this.ButtonState ==
ButtonState
.Pushed);
winforms\Managed\System\WinForms\DataGridViewHeaderCell.cs (14)
41
protected
ButtonState
ButtonState
49
return (
ButtonState
) buttonState;
51
return
ButtonState
.Normal;
55
private
ButtonState
ButtonStatePrivate
62
Debug.Assert(Enum.IsDefined(typeof(
ButtonState
), value));
545
return this.ButtonState !=
ButtonState
.Normal && this.DataGridView.ApplyVisualStylesToHeaderCells;
565
UpdateButtonState(
ButtonState
.Pushed, e.RowIndex);
580
this.ButtonState ==
ButtonState
.Normal &&
584
UpdateButtonState(
ButtonState
.Pushed, rowIndex);
599
if (this.ButtonState !=
ButtonState
.Normal)
601
Debug.Assert(this.ButtonState ==
ButtonState
.Pushed);
604
UpdateButtonState(
ButtonState
.Normal, rowIndex);
619
UpdateButtonState(
ButtonState
.Normal, e.RowIndex);
675
private void UpdateButtonState(
ButtonState
newButtonState, int rowIndex)
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (2)
818
if (this.ButtonState !=
ButtonState
.Normal)
820
Debug.Assert(this.ButtonState ==
ButtonState
.Pushed);
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (2)
289
if (this.ButtonState !=
ButtonState
.Normal)
291
Debug.Assert(this.ButtonState ==
ButtonState
.Pushed);
winforms\Managed\System\WinForms\RadioButtonRenderer.cs (20)
231
internal static
ButtonState
ConvertToButtonState(RadioButtonState state) {
235
return
ButtonState
.Checked;
237
return (
ButtonState
.Checked |
ButtonState
.Pushed);
239
return (
ButtonState
.Checked |
ButtonState
.Inactive);
242
return
ButtonState
.Pushed;
244
return
ButtonState
.Inactive;
247
return
ButtonState
.Normal;
251
internal static RadioButtonState ConvertFromButtonState(
ButtonState
state, bool isHot) {
252
if ((state &
ButtonState
.Checked) ==
ButtonState
.Checked) {
253
if ((state &
ButtonState
.Pushed) ==
ButtonState
.Pushed) {
256
else if ((state &
ButtonState
.Inactive) ==
ButtonState
.Inactive) {
266
if ((state &
ButtonState
.Pushed) ==
ButtonState
.Pushed) {
269
else if ((state &
ButtonState
.Inactive) ==
ButtonState
.Inactive) {
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (1)
820
ControlPaint.DrawCaptionButton(g, new Rectangle(Point.Empty, image.Size), (CaptionButton)buttonToUse,
ButtonState
.Flat);
winforms\Managed\System\WinForms\UpDownBase.cs (6)
1724
pushed == ButtonID.Up ?
ButtonState
.Pushed : (Enabled ?
ButtonState
.Normal :
ButtonState
.Inactive));
1729
pushed == ButtonID.Down ?
ButtonState
.Pushed : (Enabled ?
ButtonState
.Normal :
ButtonState
.Inactive));
System.Workflow.ComponentModel (11)
AuthoringOM\Design\DesignerHelpers.cs (5)
290
public static void Draw3DButton(Graphics graphics, Image image, Rectangle bounds, float transparency,
ButtonState
buttonState)
303
if (buttonState ==
ButtonState
.Normal || buttonState ==
ButtonState
.Inactive)
312
else if (buttonState ==
ButtonState
.Pushed)
321
DrawImage(graphics, image, bounds, new Rectangle(Point.Empty, image.Size), DesignerContentAlignment.Fill, transparency, (buttonState ==
ButtonState
.Inactive));
AuthoringOM\Design\DesignerWidgets.cs (2)
3414
ActivityDesignerPaint.Draw3DButton(graphics, null, this.previewModeButtonRectangle, 1.0f, (!PreviewMode) ?
ButtonState
.Pushed :
ButtonState
.Normal);
AuthoringOM\Design\MessageFilters\DynamicActionMessageFilter.cs (4)
535
ActivityDesignerPaint.Draw3DButton(graphics, null, Bounds, this.transparency - 0.1f,
ButtonState
.Normal);
551
ButtonState
state = (button.State == ActionButton.States.Highlight) ?
ButtonState
.Normal :
ButtonState
.Pushed;