1146 references to FlatStyle
Accessibility_Core_App (6)
CommonControl1.Designer.cs (3)
116
this.button12.FlatStyle = System.Windows.Forms.
FlatStyle
.System;
139
this.button10.FlatStyle = System.Windows.Forms.
FlatStyle
.Flat;
160
this.button8.FlatStyle = System.Windows.Forms.
FlatStyle
.Popup;
ContainerControls.Designer.cs (3)
219
this.groupBox2.FlatStyle = System.Windows.Forms.
FlatStyle
.Flat;
242
this.groupBox3.FlatStyle = System.Windows.Forms.
FlatStyle
.Popup;
265
this.groupBox4.FlatStyle = System.Windows.Forms.
FlatStyle
.System;
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.cs (3)
526
button.FlatStyle =
FlatStyle
.Flat;
807
button.FlatStyle =
FlatStyle
.Standard;
823
button.FlatStyle =
FlatStyle
.Flat;
System.Windows.Forms (150)
System\Windows\Forms\Controls\Buttons\Button.cs (2)
28
/// For buttons whose style is <see cref="
FlatStyle
.Flat"/>, this property specifies the size, in pixels
86
if (FlatStyle !=
FlatStyle
.System)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (10)
20
private
FlatStyle
_flatStyle =
FlatStyle
.Standard;
48
private
FlatStyle
_cachedAdapterType;
338
[DefaultValue(
FlatStyle
.Standard)]
341
public
FlatStyle
FlatStyle
608
if (FlatStyle ==
FlatStyle
.Standard)
620
internal bool OwnerDraw => FlatStyle !=
FlatStyle
.System;
972
case
FlatStyle
.Standard:
975
case
FlatStyle
.Popup:
978
case
FlatStyle
.Flat:
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
615
if (Control.FlatStyle !=
FlatStyle
.System)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
160
if (Application.RenderWithVisualStyles && Control.FlatStyle !=
FlatStyle
.Standard)
System\Windows\Forms\Controls\Buttons\CheckBox.cs (5)
278
if (FlatStyle !=
FlatStyle
.System)
300
else if (FlatStyle ==
FlatStyle
.Standard)
317
if (Appearance == Appearance.Button || FlatStyle ==
FlatStyle
.System)
410
if (FlatStyle ==
FlatStyle
.System)
427
if (FlatStyle ==
FlatStyle
.System)
System\Windows\Forms\Controls\Buttons\RadioButton.cs (3)
249
if (FlatStyle !=
FlatStyle
.System)
274
else if (FlatStyle ==
FlatStyle
.Standard)
287
Appearance == Appearance.Button || FlatStyle ==
FlatStyle
.System
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (16)
52
private
FlatStyle
_flatStyle =
FlatStyle
.Standard;
497
[DefaultValue(
FlatStyle
.Standard)]
500
public
FlatStyle
FlatStyle
718
if ((!ContainsFocus || !Application.RenderWithVisualStyles) && FlatStyle ==
FlatStyle
.Popup)
1518
if (FlatStyle ==
FlatStyle
.Popup)
1562
if (FlatStyle ==
FlatStyle
.Popup)
3664
&& (FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup))
3733
&& (FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup)
3768
if ((!Enabled || FlatStyle ==
FlatStyle
.Popup) && MouseIsOver)
3785
if (!GetStyle(ControlStyles.UserPaint) && (FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup))
3791
if (!GetStyle(ControlStyles.UserPaint) && (FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup))
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
82
if ((!comboBox.Enabled) || (comboBox.FlatStyle ==
FlatStyle
.Popup))
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (23)
57
[DefaultValue(
FlatStyle
.Standard)]
58
public
FlatStyle
FlatStyle
60
get => Properties.GetValueOrDefault(s_propButtonCellFlatStyle,
FlatStyle
.Standard);
66
Properties.AddOrRemoveValue(s_propButtonCellFlatStyle, value, defaultValue:
FlatStyle
.Standard);
72
internal
FlatStyle
FlatStyleInternal
76
Debug.Assert(value is >=
FlatStyle
.Flat and <=
FlatStyle
.System);
536
(DataGridView.ApplyVisualStylesToInnerCells || FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup))
561
if (DataGridView.ApplyVisualStylesToInnerCells || FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup)
717
case
FlatStyle
.Standard:
718
case
FlatStyle
.System:
762
case
FlatStyle
.Flat:
798
Debug.Assert(FlatStyle ==
FlatStyle
.Popup, "FlatStyle.Popup is the last flat style");
888
if (FlatStyle is
FlatStyle
.System or
FlatStyle
.Standard)
892
else if (FlatStyle ==
FlatStyle
.Flat)
928
Debug.Assert(FlatStyle ==
FlatStyle
.Popup, "FlatStyle.Popup is the last flat style");
967
FlatStyle !=
FlatStyle
.Flat && FlatStyle !=
FlatStyle
.Popup)
978
(FlatStyle ==
FlatStyle
.System || FlatStyle ==
FlatStyle
.Standard))
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (2)
54
[DefaultValue(
FlatStyle
.Standard)]
58
public
FlatStyle
FlatStyle
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (31)
232
[DefaultValue(
FlatStyle
.Standard)]
233
public
FlatStyle
FlatStyle
235
get => Properties.GetValueOrDefault(s_propFlatStyle,
FlatStyle
.Standard);
239
FlatStyle
previous = Properties.AddOrRemoveValue(s_propFlatStyle, value, defaultValue:
FlatStyle
.Standard);
247
internal
FlatStyle
FlatStyleInternal
251
Debug.Assert(value is >=
FlatStyle
.Flat and <=
FlatStyle
.System);
254
Properties.AddOrRemoveValue(s_propFlatStyle, value, defaultValue:
FlatStyle
.Standard);
659
case
FlatStyle
.Standard:
660
case
FlatStyle
.System:
662
case
FlatStyle
.Flat:
666
case
FlatStyle
.Popup:
698
FlatStyle
.Flat => CheckBoxRenderer.GetGlyphSize(graphics, CheckBoxState.UncheckedNormal).Width - 3,
699
FlatStyle
.Popup => CheckBoxRenderer.GetGlyphSize(graphics, CheckBoxState.UncheckedNormal).Width - 2,
886
(DataGridView.ApplyVisualStylesToInnerCells || FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup))
911
if (DataGridView.ApplyVisualStylesToInnerCells || FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup)
1166
case
FlatStyle
.Standard:
1167
case
FlatStyle
.System:
1169
case
FlatStyle
.Flat:
1173
case
FlatStyle
.Popup:
1183
case
FlatStyle
.Flat:
1188
case
FlatStyle
.Popup:
1231
if (DataGridView.ApplyVisualStylesToInnerCells && FlatStyle !=
FlatStyle
.Flat && FlatStyle !=
FlatStyle
.Popup)
1245
if (FlatStyle is
FlatStyle
.System or
FlatStyle
.Standard)
1273
else if (FlatStyle ==
FlatStyle
.Flat)
1382
Debug.Assert(FlatStyle ==
FlatStyle
.Popup);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (2)
101
[DefaultValue(
FlatStyle
.Standard)]
105
public
FlatStyle
FlatStyle
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (22)
343
[DefaultValue(
FlatStyle
.Standard)]
344
public
FlatStyle
FlatStyle
346
get => Properties.GetValueOrDefault(s_propComboBoxCellFlatStyle,
FlatStyle
.Standard);
351
FlatStyle
originalValue = Properties.AddOrRemoveValue(s_propComboBoxCellFlatStyle, value, defaultValue:
FlatStyle
.Standard);
359
internal
FlatStyle
FlatStyleInternal
363
Debug.Assert(value is >=
FlatStyle
.Flat and <=
FlatStyle
.System);
364
Properties.AddOrRemoveValue(s_propComboBoxCellFlatStyle, value, defaultValue:
FlatStyle
.Standard);
401
bool paintFlat = FlatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup;
1209
if (FlatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup)
1695
if (DisplayStyle == DataGridViewComboBoxDisplayStyle.ComboBox && FlatStyle ==
FlatStyle
.Popup)
1715
(FlatStyle ==
FlatStyle
.Standard || FlatStyle ==
FlatStyle
.System) &&
1722
if (DisplayStyle == DataGridViewComboBoxDisplayStyle.ComboBox && FlatStyle ==
FlatStyle
.Popup)
1737
if ((FlatStyle ==
FlatStyle
.Standard || FlatStyle ==
FlatStyle
.System) && DataGridView.ApplyVisualStylesToInnerCells)
1891
bool paintFlat = FlatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup;
1892
bool paintPopup = FlatStyle ==
FlatStyle
.Popup &&
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxColumn.cs (2)
308
[DefaultValue(
FlatStyle
.Standard)]
312
public
FlatStyle
FlatStyle
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (5)
23
private
FlatStyle
_flatStyle =
FlatStyle
.Standard;
172
[DefaultValue(
FlatStyle
.Standard)]
174
public
FlatStyle
FlatStyle
215
private bool OwnerDraw => FlatStyle !=
FlatStyle
.System;
System\Windows\Forms\Controls\Labels\Label.cs (11)
34
private static readonly BitVector32.Section s_stateFlatStyle = BitVector32.CreateSection((int)
FlatStyle
.System, s_stateAnimating);
83
_labelState[s_stateFlatStyle] = (int)
FlatStyle
.Standard;
321
[DefaultValue(
FlatStyle
.Standard)]
323
public
FlatStyle
FlatStyle
325
get => (
FlatStyle
)_labelState[s_stateFlatStyle];
336
bool needRecreate = (_labelState[s_stateFlatStyle] == (int)
FlatStyle
.System) || (value ==
FlatStyle
.System);
1047
internal virtual bool UseGDIMeasuring() => (FlatStyle ==
FlatStyle
.System || !UseCompatibleTextRendering);
1074
TextFormatFlags format = FlatStyle ==
FlatStyle
.System ? TextFormatFlags.Default : CreateTextFormatFlags(proposedConstraints);
1106
if (UseCompatibleTextRendering && FlatStyle !=
FlatStyle
.System)
1146
private bool IsOwnerDraw() => FlatStyle !=
FlatStyle
.System;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
149
public new
FlatStyle
FlatStyle
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (3)
47
FlatStyle =
FlatStyle
.Popup,
182
[DefaultValue(
FlatStyle
.Popup)]
185
public
FlatStyle
FlatStyle
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.cs (1)
12
FlatStyle =
FlatStyle
.Popup;
System\Windows\Forms\Design\ComponentEditorForm.cs (4)
270
_helpButton.FlatStyle =
FlatStyle
.System;
277
_applyButton.FlatStyle =
FlatStyle
.System;
283
_cancelButton.FlatStyle =
FlatStyle
.System;
290
_okButton.FlatStyle =
FlatStyle
.System;
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (4)
271
_continueButton.FlatStyle =
FlatStyle
.Standard;
275
_quitButton.FlatStyle =
FlatStyle
.Standard;
279
_helpButton.FlatStyle =
FlatStyle
.Standard;
283
_detailsButton.FlatStyle =
FlatStyle
.Standard;
System.Windows.Forms.Design (24)
System\Windows\Forms\Design\ButtonBaseDesigner.cs (24)
48
FlatStyle
flatStyle =
FlatStyle
.Standard;
105
private static int CheckboxBaselineOffset(ContentAlignment alignment,
FlatStyle
flatStyle)
109
if (flatStyle is
FlatStyle
.Standard or
FlatStyle
.System)
120
if (flatStyle ==
FlatStyle
.Standard)
124
else if (flatStyle ==
FlatStyle
.System)
128
else if (flatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup)
141
if (flatStyle ==
FlatStyle
.Standard)
145
else if (flatStyle ==
FlatStyle
.System)
149
else if (flatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup)
161
private static int RadiobuttonBaselineOffset(ContentAlignment alignment,
FlatStyle
flatStyle)
165
if (flatStyle ==
FlatStyle
.System)
176
if (flatStyle is
FlatStyle
.Standard or
FlatStyle
.Flat or
FlatStyle
.Popup)
180
else if (flatStyle ==
FlatStyle
.System)
192
private static int DefaultBaselineOffset(ContentAlignment alignment,
FlatStyle
flatStyle)
201
if (flatStyle is
FlatStyle
.Standard or
FlatStyle
.Popup)
205
else if (flatStyle ==
FlatStyle
.System)
209
else if (flatStyle ==
FlatStyle
.Flat)
System.Windows.Forms.Tests (940)
LinkLabelTests.cs (5)
28
_linkLabel.FlatStyle.Should().Be(
FlatStyle
.Standard);
32
[InlineData(
FlatStyle
.Flat)]
33
[InlineData(
FlatStyle
.Popup)]
34
[InlineData(
FlatStyle
.System)]
35
public void LinkLabel_FlatStyle_Set_ReturnsExpected(
FlatStyle
flatStyle)
System\Windows\Forms\AbstractButtonBaseTests.cs (9)
15
control.FlatStyle =
FlatStyle
.Flat;
37
control.FlatStyle =
FlatStyle
.Flat;
48
protected virtual void ButtonBase_OverChangeRectangle_Get(Appearance appearance,
FlatStyle
flatStyle)
64
&& (flatStyle !=
FlatStyle
.Standard
65
&& flatStyle !=
FlatStyle
.Popup
66
&& flatStyle !=
FlatStyle
.Flat))
78
if (control.FlatStyle ==
FlatStyle
.Standard)
85
if (control.FlatStyle !=
FlatStyle
.Standard)
90
else if (control.FlatStyle !=
FlatStyle
.Standard)
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (21)
25
[InlineData(
FlatStyle
.Flat, true, true, AccessibleStates.Focusable | AccessibleStates.Pressed)]
26
[InlineData(
FlatStyle
.Flat, false, true, AccessibleStates.None)]
27
[InlineData(
FlatStyle
.Flat, true, false, AccessibleStates.Focusable)]
28
[InlineData(
FlatStyle
.Flat, false, false, AccessibleStates.None)]
29
[InlineData(
FlatStyle
.Popup, true, true, AccessibleStates.Focusable | AccessibleStates.Pressed)]
30
[InlineData(
FlatStyle
.Popup, false, true, AccessibleStates.None)]
31
[InlineData(
FlatStyle
.Popup, true, false, AccessibleStates.Focusable)]
32
[InlineData(
FlatStyle
.Popup, false, false, AccessibleStates.None)]
33
[InlineData(
FlatStyle
.Standard, true, true, AccessibleStates.Focusable | AccessibleStates.Pressed)]
34
[InlineData(
FlatStyle
.Standard, false, true, AccessibleStates.None)]
35
[InlineData(
FlatStyle
.Standard, true, false, AccessibleStates.Focusable)]
36
[InlineData(
FlatStyle
.Standard, false, false, AccessibleStates.None)]
37
[InlineData(
FlatStyle
.System, true, true, AccessibleStates.Focusable)]
38
[InlineData(
FlatStyle
.System, false, true, AccessibleStates.None)]
39
[InlineData(
FlatStyle
.System, true, false, AccessibleStates.Focusable)]
40
[InlineData(
FlatStyle
.System, false, false, AccessibleStates.None)]
41
public void ButtonBaseAccessibleObject_State_is_correct(
FlatStyle
flatStyle, bool createControl, bool mouseIsDown, AccessibleStates expectedAccessibleState)
98
[EnumData<
FlatStyle
>]
99
public void ButtonBase_CreateAccessibilityInstance_InvokeWithDefaultRole_ReturnsExpected_ForAllFlatStyles_IfControlIsCreated(
FlatStyle
flatStyle)
112
[EnumData<
FlatStyle
>]
113
public void ButtonBase_CreateAccessibilityInstance_InvokeWithDefaultRole_ReturnsNone_ForAllFlatStyles_IfControlIsNotCreated(
FlatStyle
flatStyle)
System\Windows\Forms\ButtonBaseTests.cs (373)
66
Assert.Equal(
FlatStyle
.Standard, control.FlatStyle);
146
[InlineData(
FlatStyle
.Flat, true, 0x56010000)]
147
[InlineData(
FlatStyle
.Flat, false, 0x56010000)]
148
[InlineData(
FlatStyle
.Popup, true, 0x56010000)]
149
[InlineData(
FlatStyle
.Popup, false, 0x56010000)]
150
[InlineData(
FlatStyle
.Standard, true, 0x56010000)]
151
[InlineData(
FlatStyle
.Standard, false, 0x56010000)]
152
[InlineData(
FlatStyle
.System, true, 0x56012F01)]
153
[InlineData(
FlatStyle
.System, false, 0x56012F00)]
154
public void ButtonBase_CreateParams_GetIsDefault_ReturnsExpected(
FlatStyle
flatStyle, bool isDefault, int expectedStyle)
180
foreach (
FlatStyle
flatStyle in new
FlatStyle
[] {
FlatStyle
.Flat,
FlatStyle
.Popup,
FlatStyle
.Standard })
190
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.BottomLeft, 0x56012A00, 0x6000 };
191
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.BottomCenter, 0x56012B00, 0x6000 };
192
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.BottomRight, 0x56012900, 0x6000 };
193
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.MiddleLeft, 0x56012E00, 0x6000 };
194
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.MiddleCenter, 0x56012F00, 0x6000 };
195
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.MiddleRight, 0x56012D00, 0x6000 };
196
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.TopLeft, 0x56012600, 0x6000 };
197
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.TopCenter, 0x56012700, 0x6000 };
198
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.TopRight, 0x56012500, 0x6000 };
200
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.BottomLeft, 0x56012900, 0 };
201
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.BottomCenter, 0x56012B00, 0 };
202
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.BottomRight, 0x56012A00, 0 };
203
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.MiddleLeft, 0x56012D00, 0 };
204
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.MiddleCenter, 0x56012F00, 0 };
205
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.MiddleRight, 0x56012E00, 0 };
206
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.TopLeft, 0x56012500, 0 };
207
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.TopCenter, 0x56012700, 0 };
208
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.TopRight, 0x56012600, 0 };
210
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.BottomLeft, 0x56012900, 0 };
211
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.BottomCenter, 0x56012B00, 0 };
212
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.BottomRight, 0x56012A00, 0 };
213
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.MiddleLeft, 0x56012D00, 0 };
214
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.MiddleCenter, 0x56012F00, 0 };
215
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.MiddleRight, 0x56012E00, 0 };
216
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.TopLeft, 0x56012500, 0 };
217
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.TopCenter, 0x56012700, 0 };
218
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.TopRight, 0x56012600, 0 };
223
public void ButtonBase_CreateParams_GetTextAlign_ReturnsExpected(
FlatStyle
flatStyle, RightToLeft rightToLeft, ContentAlignment textAlign, int expectedStyle, int expectedExStyle)
1044
foreach (
FlatStyle
value in Enum.GetValues(typeof(
FlatStyle
)))
1053
public void ButtonBase_FlatStyle_Set_GetReturnsExpected(bool autoSize,
FlatStyle
value)
1064
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1065
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1072
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1073
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1082
foreach (
FlatStyle
oldValue in Enum.GetValues(typeof(
FlatStyle
)))
1084
foreach (
FlatStyle
value in Enum.GetValues(typeof(
FlatStyle
)))
1094
public void ButtonBase_FlatStyle_SetWithCustomOldValue_GetReturnsExpected(bool autoSize,
FlatStyle
oldValue,
FlatStyle
value)
1106
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1107
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1114
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1115
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1122
yield return new object[] { true,
FlatStyle
.Flat, 1 };
1123
yield return new object[] { true,
FlatStyle
.Popup, 1 };
1124
yield return new object[] { true,
FlatStyle
.Standard, 0 };
1125
yield return new object[] { true,
FlatStyle
.System, 1 };
1127
yield return new object[] { false,
FlatStyle
.Flat, 0 };
1128
yield return new object[] { false,
FlatStyle
.Popup, 0 };
1129
yield return new object[] { false,
FlatStyle
.Standard, 0 };
1130
yield return new object[] { false,
FlatStyle
.System, 0 };
1135
public void ButtonBase_FlatStyle_SetWithParent_GetReturnsExpected(bool autoSize,
FlatStyle
value, int expectedParentLayoutCallCount)
1160
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1161
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1170
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1171
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1187
yield return new object[] { autoSize,
FlatStyle
.Flat, 1, 0 };
1188
yield return new object[] { autoSize,
FlatStyle
.Popup, 1, 0 };
1189
yield return new object[] { autoSize,
FlatStyle
.Standard, 0, 0 };
1190
yield return new object[] { autoSize,
FlatStyle
.System, 1, 1 };
1196
public void ButtonBase_FlatStyle_SetWithHandle_GetReturnsExpected(bool autoSize,
FlatStyle
value, int expectedInvalidatedCallCount, int expectedCreatedCallCount)
1214
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1215
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1224
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1225
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1234
yield return new object[] {
FlatStyle
.Flat,
FlatStyle
.Flat, 0, 0 };
1235
yield return new object[] {
FlatStyle
.Flat,
FlatStyle
.Popup, 1, 0 };
1236
yield return new object[] {
FlatStyle
.Flat,
FlatStyle
.Standard, 1, 0 };
1237
yield return new object[] {
FlatStyle
.Flat,
FlatStyle
.System, 1, 1 };
1239
yield return new object[] {
FlatStyle
.Popup,
FlatStyle
.Flat, 1, 0 };
1240
yield return new object[] {
FlatStyle
.Popup,
FlatStyle
.Popup, 0, 0 };
1241
yield return new object[] {
FlatStyle
.Popup,
FlatStyle
.Standard, 1, 0 };
1242
yield return new object[] {
FlatStyle
.Popup,
FlatStyle
.System, 1, 1 };
1244
yield return new object[] {
FlatStyle
.Standard,
FlatStyle
.Flat, 1, 0 };
1245
yield return new object[] {
FlatStyle
.Standard,
FlatStyle
.Popup, 1, 0 };
1246
yield return new object[] {
FlatStyle
.Standard,
FlatStyle
.Standard, 0, 0 };
1247
yield return new object[] {
FlatStyle
.Standard,
FlatStyle
.System, 1, 1 };
1249
yield return new object[] {
FlatStyle
.System,
FlatStyle
.Flat, 1, 1 };
1250
yield return new object[] {
FlatStyle
.System,
FlatStyle
.Popup, 1, 1 };
1251
yield return new object[] {
FlatStyle
.System,
FlatStyle
.Standard, 1, 1 };
1252
yield return new object[] {
FlatStyle
.System,
FlatStyle
.System, 0, 0 };
1257
public void ButtonBase_FlatStyle_SetWithCustomOldValueWithHandle_GetReturnsExpected(
FlatStyle
oldValue,
FlatStyle
value, int expectedInvalidatedCallCount, int expectedCreatedCallCount)
1273
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1274
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1283
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1284
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1293
yield return new object[] { true,
FlatStyle
.Flat, 1, 1, 0 };
1294
yield return new object[] { true,
FlatStyle
.Popup, 1, 1, 0 };
1295
yield return new object[] { true,
FlatStyle
.Standard, 0, 0, 0 };
1296
yield return new object[] { true,
FlatStyle
.System, 1, 1, 1 };
1298
yield return new object[] { false,
FlatStyle
.Flat, 0, 1, 0 };
1299
yield return new object[] { false,
FlatStyle
.Popup, 0, 1, 0 };
1300
yield return new object[] { false,
FlatStyle
.Standard, 0, 0, 0 };
1301
yield return new object[] { false,
FlatStyle
.System, 0, 1, 1 };
1306
public void ButtonBase_FlatStyle_SetWithParentWithHandle_GetReturnsExpected(bool autoSize,
FlatStyle
value, int expectedParentLayoutCallCount, int expectedInvalidatedCallCount, int expectedCreatedCallCount)
1339
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1340
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1352
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserMouse));
1353
Assert.Equal(value !=
FlatStyle
.System, control.GetStyle(ControlStyles.UserPaint));
1369
[InvalidEnumData<
FlatStyle
>]
1370
public void ButtonBase_FlatStyle_SetInvalidValue_ThrowsInvalidEnumArgumentException(
FlatStyle
value)
2709
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
2718
public void ButtonBase_IsDefault_Set_GetReturnsExpected(
FlatStyle
flatStyle, bool value)
2741
yield return new object[] {
FlatStyle
.Flat, true, 1, 0, 2, 0 };
2742
yield return new object[] {
FlatStyle
.Popup, true, 1, 0, 2, 0 };
2743
yield return new object[] {
FlatStyle
.Standard, true, 1, 0, 2, 0 };
2744
yield return new object[] {
FlatStyle
.System, true, 1, 1, 2, 2 };
2746
yield return new object[] {
FlatStyle
.Flat, false, 0, 0, 1, 0 };
2747
yield return new object[] {
FlatStyle
.Popup, false, 0, 0, 1, 0 };
2748
yield return new object[] {
FlatStyle
.Standard, false, 0, 0, 1, 0 };
2749
yield return new object[] {
FlatStyle
.System, false, 0, 0, 1, 1 };
2754
public void ButtonBase_IsDefault_SetWithHandle_GetReturnsExpected(
FlatStyle
flatStyle, bool value, int expectedInvalidatedCallCount1, int expectedStyleChangeCallCount1, int expectedInvalidatedCallCount2, int expectedStyleChangeCallCount2)
3264
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
3276
public void ButtonBase_TextAlign_Set_GetReturnsExpected(bool autoSize,
FlatStyle
flatStyle, ContentAlignment value)
3300
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
3313
public void ButtonBase_TextAlign_SetWithParent_GetReturnsExpected(bool autoSize,
FlatStyle
flatStyle, ContentAlignment value, int expectedParentLayoutCallCount)
3365
yield return new object[] { autoSize,
FlatStyle
.Flat, value, expectedCallCount, 0 };
3366
yield return new object[] { autoSize,
FlatStyle
.Popup, value, expectedCallCount, 0 };
3367
yield return new object[] { autoSize,
FlatStyle
.Standard, value, expectedCallCount, 0 };
3368
yield return new object[] { autoSize,
FlatStyle
.System, value, expectedCallCount, expectedCallCount };
3375
public void ButtonBase_TextAlign_SetWithHandle_GetReturnsExpected(bool autoSize,
FlatStyle
flatStyle, ContentAlignment value, int expectedInvalidatedCallCount, int expectedStyleChangedCallCount)
3415
yield return new object[] { true,
FlatStyle
.Flat, value, expectedCallCount, expectedCallCount, 0 };
3416
yield return new object[] { true,
FlatStyle
.Popup, value, expectedCallCount, expectedCallCount, 0 };
3417
yield return new object[] { true,
FlatStyle
.Standard, value, expectedCallCount, expectedCallCount, 0 };
3418
yield return new object[] { true,
FlatStyle
.System, value, expectedCallCount, expectedCallCount, expectedCallCount };
3420
yield return new object[] { false,
FlatStyle
.Flat, value, 0, expectedCallCount, 0 };
3421
yield return new object[] { false,
FlatStyle
.Popup, value, 0, expectedCallCount, 0 };
3422
yield return new object[] { false,
FlatStyle
.Standard, value, 0, expectedCallCount, 0 };
3423
yield return new object[] { false,
FlatStyle
.System, value, 0, expectedCallCount, expectedCallCount };
3429
public void ButtonBase_TextAlign_SetWithParentWithHandle_GetReturnsExpected(bool autoSize,
FlatStyle
flatStyle, ContentAlignment value, int expectedParentLayoutCallCount, int expectedInvalidatedCallCount, int expectedStyleChangedCallCount)
4995
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
5010
public void ButtonBase_GetPreferredSize_Invoke_ThrowsNullReferenceException(
FlatStyle
flatStyle, Size proposedSize)
5029
public void ButtonBase_GetPreferredSize_InvokeWithHandle_ThrowsNullReferenceException(
FlatStyle
flatStyle, Size proposedSize)
5478
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
5480
bool expectedIsHandleCreated = flatStyle ==
FlatStyle
.System;
5492
public void ButtonBase_OnKeyDown_Invoke_CallsKeyDown(
FlatStyle
flatStyle, bool enabled, KeyEventArgs eventArgs, bool expectedHandled, bool expectedIsHandleCreated)
5524
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
5537
public void ButtonBase_OnKeyDown_InvokeMouseDown_CallsKeyDown(
FlatStyle
flatStyle, bool enabled, KeyEventArgs eventArgs, bool expectedHandled)
5570
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
5583
public void ButtonBase_OnKeyDown_InvokeWithHandle_CallsKeyDown(
FlatStyle
flatStyle, bool enabled, KeyEventArgs eventArgs, bool expectedHandled, int expectedInvalidatedCallCount)
5628
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
5641
public void ButtonBase_OnKeyDown_InvokeMouseDownWithHandle_CallsKeyDown(
FlatStyle
flatStyle, bool enabled, KeyEventArgs eventArgs, bool expectedHandled)
5686
[InlineData(
FlatStyle
.Flat, Keys.Cancel, 0)]
5687
[InlineData(
FlatStyle
.Flat, Keys.Enter, 0)]
5688
[InlineData(
FlatStyle
.Flat, Keys.Space, 0)]
5689
[InlineData(
FlatStyle
.Popup, Keys.Cancel, 0)]
5690
[InlineData(
FlatStyle
.Popup, Keys.Enter, 0)]
5691
[InlineData(
FlatStyle
.Popup, Keys.Space, 0)]
5692
[InlineData(
FlatStyle
.Standard, Keys.Cancel, 0)]
5693
[InlineData(
FlatStyle
.Standard, Keys.Enter, 0)]
5694
[InlineData(
FlatStyle
.Standard, Keys.Space, 0)]
5695
[InlineData(
FlatStyle
.System, Keys.Cancel, 0)]
5696
[InlineData(
FlatStyle
.System, Keys.Enter, 0)]
5697
[InlineData(
FlatStyle
.System, Keys.Space, 0)]
5698
public void ButtonBase_OnKeyDown_GetState_ReturnsExpected(
FlatStyle
flatStyle, Keys key, int expected)
5710
[InlineData(
FlatStyle
.Flat, Keys.Cancel, 0)]
5711
[InlineData(
FlatStyle
.Flat, Keys.Enter, 0)]
5712
[InlineData(
FlatStyle
.Flat, Keys.Space, 0)]
5713
[InlineData(
FlatStyle
.Popup, Keys.Cancel, 0)]
5714
[InlineData(
FlatStyle
.Popup, Keys.Enter, 0)]
5715
[InlineData(
FlatStyle
.Popup, Keys.Space, 0)]
5716
[InlineData(
FlatStyle
.Standard, Keys.Cancel, 0)]
5717
[InlineData(
FlatStyle
.Standard, Keys.Enter, 0)]
5718
[InlineData(
FlatStyle
.Standard, Keys.Space, 0)]
5719
[InlineData(
FlatStyle
.System, Keys.Cancel, 0)]
5720
[InlineData(
FlatStyle
.System, Keys.Enter, 0)]
5721
[InlineData(
FlatStyle
.System, Keys.Space, 0)]
5722
public void ButtonBase_OnKeyDown_MouseDownGetState_ReturnsExpected(
FlatStyle
flatStyle, Keys key, int expected)
5743
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
5757
public void ButtonBase_OnKeyUp_Invoke_CallsKeyUp(
FlatStyle
flatStyle, bool enabled, KeyEventArgs eventArgs)
5792
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
5796
bool expectedIsHandleCreated = flatStyle ==
FlatStyle
.System;
5806
public void ButtonBase_OnKeyUp_InvokeMouseDown_CallsKeyUp(
FlatStyle
flatStyle, bool enabled, KeyEventArgs eventArgs, int expectedClickCallCount, bool expectedIsHandleCreated)
5848
public void ButtonBase_OnKeyUp_InvokeWithHandle_CallsKeyUp(
FlatStyle
flatStyle, bool enabled, KeyEventArgs eventArgs)
5897
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
5901
int expectedCallCount = flatStyle ==
FlatStyle
.System ? 0 : 1;
5911
public void ButtonBase_OnKeyUp_InvokeMouseDownWithHandle_CallsKeyUp(
FlatStyle
flatStyle, bool enabled, KeyEventArgs eventArgs, int expectedClickCallCount, int expectedInvalidatedCallCount)
5965
[InlineData(
FlatStyle
.Flat, Keys.Cancel, 0)]
5966
[InlineData(
FlatStyle
.Flat, Keys.Enter, 0)]
5967
[InlineData(
FlatStyle
.Flat, Keys.Space, 0)]
5968
[InlineData(
FlatStyle
.Popup, Keys.Cancel, 0)]
5969
[InlineData(
FlatStyle
.Popup, Keys.Enter, 0)]
5970
[InlineData(
FlatStyle
.Popup, Keys.Space, 0)]
5971
[InlineData(
FlatStyle
.Standard, Keys.Cancel, 0)]
5972
[InlineData(
FlatStyle
.Standard, Keys.Enter, 0)]
5973
[InlineData(
FlatStyle
.Standard, Keys.Space, 0)]
5974
[InlineData(
FlatStyle
.System, Keys.Cancel, 0)]
5975
[InlineData(
FlatStyle
.System, Keys.Enter, 0)]
5976
[InlineData(
FlatStyle
.System, Keys.Space, 0)]
5977
public void ButtonBase_OnKeyUp_GetState_ReturnsExpected(
FlatStyle
flatStyle, Keys key, int expected)
5989
[InlineData(
FlatStyle
.Flat, Keys.Cancel, 0)]
5990
[InlineData(
FlatStyle
.Flat, Keys.Enter, 0)]
5991
[InlineData(
FlatStyle
.Flat, Keys.Space, 0)]
5992
[InlineData(
FlatStyle
.Popup, Keys.Cancel, 0)]
5993
[InlineData(
FlatStyle
.Popup, Keys.Enter, 0)]
5994
[InlineData(
FlatStyle
.Popup, Keys.Space, 0)]
5995
[InlineData(
FlatStyle
.Standard, Keys.Cancel, 0)]
5996
[InlineData(
FlatStyle
.Standard, Keys.Enter, 0)]
5997
[InlineData(
FlatStyle
.Standard, Keys.Space, 0)]
5998
[InlineData(
FlatStyle
.System, Keys.Cancel, 0)]
5999
[InlineData(
FlatStyle
.System, Keys.Enter, 0)]
6000
[InlineData(
FlatStyle
.System, Keys.Space, 0)]
6001
public void ButtonBase_OnKeyUp_MouseDownGetState_ReturnsExpected(
FlatStyle
flatStyle, Keys key, int expected)
6092
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
6111
public void ButtonBase_OnMouseDown_Invoke_CallsMouseDown(
FlatStyle
flatStyle, bool enabled, MouseEventArgs eventArgs)
6141
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
6160
public void ButtonBase_OnMouseDown_InvokeWithHandle_CallsMouseDown(
FlatStyle
flatStyle, bool enabled, MouseEventArgs eventArgs, int expectedInvalidatedCallCount)
6210
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
6228
public void ButtonBase_OnMouseEnter_Invoke_CallsMouseEnter(
FlatStyle
flatStyle, bool enabled, bool autoEllipsis, string text, EventArgs eventArgs)
6260
public void ButtonBase_OnMouseEnter_InvokeDesignMode_CallsMouseEnter(
FlatStyle
flatStyle, bool enabled, bool autoEllipsis, string text, EventArgs eventArgs)
6306
public void ButtonBase_OnMouseEnter_InvokeWithHandle_CallsMouseEnter(
FlatStyle
flatStyle, bool enabled, bool autoEllipsis, string text, EventArgs eventArgs)
6351
public void ButtonBase_OnMouseEnter_InvokeDesignModeWithHandle_CallsMouseEnter(
FlatStyle
flatStyle, bool enabled, bool autoEllipsis, string text, EventArgs eventArgs)
6410
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
6428
public void ButtonBase_OnMouseLeave_Invoke_CallsMouseLeave(
FlatStyle
flatStyle, bool enabled, bool autoEllipsis, string text, EventArgs eventArgs)
6460
public void ButtonBase_OnMouseLeave_InvokeWithHandle_CallsMouseLeave(
FlatStyle
flatStyle, bool enabled, bool autoEllipsis, string text, EventArgs eventArgs)
6505
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
6526
public void ButtonBase_OnMouseMove_Invoke_CallsMouseMove(
FlatStyle
flatStyle, bool enabled, MouseEventArgs eventArgs)
6556
public void ButtonBase_OnMouseMove_InvokeMousePressed_CallsMouseMove(
FlatStyle
flatStyle, bool enabled, MouseEventArgs eventArgs)
6587
public void ButtonBase_OnMouseMove_InvokeMousePressedLeave_CallsMouseMove(
FlatStyle
flatStyle, bool enabled, MouseEventArgs eventArgs)
6619
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
6640
public void ButtonBase_OnMouseMove_InvokeWithHandle_CallsMouseMove(
FlatStyle
flatStyle, bool enabled, MouseEventArgs eventArgs, int expectedInvalidatedCallCount)
6683
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
6706
public void ButtonBase_OnMouseMove_InvokeMousePressedWithHandle_CallsMouseMove(
FlatStyle
flatStyle, bool enabled, MouseEventArgs eventArgs, int expectedInvalidatedCallCount)
6750
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
6773
public void ButtonBase_OnMouseMove_InvokeMousePressedLeaveWithHandle_CallsMouseMove(
FlatStyle
flatStyle, bool enabled, MouseEventArgs eventArgs, int expectedInvalidatedCallCount)
6825
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
6841
public void ButtonBase_OnMouseUp_Invoke_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs)
6878
public void ButtonBase_OnMouseUp_InvokeWithHandle_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs)
7603
[EnumData<
FlatStyle
>]
7604
public void ButtonBase_WndProc_InvokeCancelModeWithoutHandle_Success(
FlatStyle
flatStyle)
7633
[EnumData<
FlatStyle
>]
7634
public void ButtonBase_WndProc_InvokeCancelModeMousePressedWithoutHandle_Success(
FlatStyle
flatStyle)
7664
[EnumData<
FlatStyle
>]
7665
public void ButtonBase_WndProc_InvokeCancelModeMousePressedLostFocusWithoutHandle_Success(
FlatStyle
flatStyle)
7696
[EnumData<
FlatStyle
>]
7697
public void ButtonBase_WndProc_InvokeCancelModeMousePressedInButtonUpWithoutHandle_Success(
FlatStyle
flatStyle)
7740
[EnumData<
FlatStyle
>]
7741
public void ButtonBase_WndProc_InvokeCancelModeWithHandle_Success(
FlatStyle
flatStyle)
7781
[InlineData(
FlatStyle
.Flat, 1)]
7782
[InlineData(
FlatStyle
.Popup, 1)]
7783
[InlineData(
FlatStyle
.Standard, 1)]
7784
[InlineData(
FlatStyle
.System, 0)]
7785
public void ButtonBase_WndProc_InvokeCancelModeMousePressedWithHandle_Success(
FlatStyle
flatStyle, int expectedInvalidatedCallCount)
7826
[EnumData<
FlatStyle
>]
7827
public void ButtonBase_WndProc_InvokeCancelModeMousePressedLostFocusWithHandle_Success(
FlatStyle
flatStyle)
7869
[EnumData<
FlatStyle
>]
7870
public void ButtonBase_WndProc_InvokeCancelModeMousePressedInButtonUpWithHandle_Success(
FlatStyle
flatStyle)
7923
[EnumData<
FlatStyle
>]
7924
public void ButtonBase_WndProc_InvokeCaptureChangedWithoutHandle_Success(
FlatStyle
flatStyle)
7958
[EnumData<
FlatStyle
>]
7959
public void ButtonBase_WndProc_InvokeCaptureChangedMousePressedWithoutHandle_Success(
FlatStyle
flatStyle)
7994
[EnumData<
FlatStyle
>]
7995
public void ButtonBase_WndProc_InvokeCaptureChangedMousePressedLostFocusWithoutHandle_Success(
FlatStyle
flatStyle)
8031
[EnumData<
FlatStyle
>]
8032
public void ButtonBase_WndProc_InvokeCaptureChangedMousePressedLostFocusInButtonUpWithoutHandle_Success(
FlatStyle
flatStyle)
8080
[EnumData<
FlatStyle
>]
8081
public void ButtonBase_WndProc_InvokeCaptureChangedWithHandle_Success(
FlatStyle
flatStyle)
8126
[InlineData(
FlatStyle
.Flat, 1)]
8127
[InlineData(
FlatStyle
.Popup, 1)]
8128
[InlineData(
FlatStyle
.Standard, 1)]
8129
[InlineData(
FlatStyle
.System, 0)]
8130
public void ButtonBase_WndProc_InvokeCaptureChangedMousePressedWithHandle_Success(
FlatStyle
flatStyle, int expectedInvalidatedCallCount)
8176
[EnumData<
FlatStyle
>]
8177
public void ButtonBase_WndProc_InvokeCaptureChangedMousePressedLostFocusWithHandle_Success(
FlatStyle
flatStyle)
8224
[EnumData<
FlatStyle
>]
8225
public void ButtonBase_WndProc_InvokeCaptureChangedMousePressedInButtonUpWithHandle_Success(
FlatStyle
flatStyle)
8283
[EnumData<
FlatStyle
>]
8284
public void ButtonBase_WndProc_InvokeClick_Success(
FlatStyle
flatStyle)
8312
[EnumData<
FlatStyle
>]
8313
public void ButtonBase_WndProc_InvokeClickButtonButtonBase_Success(
FlatStyle
flatStyle)
8345
[EnumData<
FlatStyle
>]
8346
public void ButtonBase_WndProc_InvokeClickWithHandle_Success(
FlatStyle
flatStyle)
8385
[EnumData<
FlatStyle
>]
8386
public void ButtonBase_WndProc_InvokeClickButtonControlWithHandle_Success(
FlatStyle
flatStyle)
8428
[EnumData<
FlatStyle
>]
8429
public void ButtonBase_WndProc_InvokeKillFocusWithoutHandle_Success(
FlatStyle
flatStyle)
8463
[EnumData<
FlatStyle
>]
8464
public void ButtonBase_WndProc_InvokeKillFocusMousePressedWithoutHandle_Success(
FlatStyle
flatStyle)
8499
[EnumData<
FlatStyle
>]
8500
public void ButtonBase_WndProc_InvokeKillFocusMousePressedLostFocusWithoutHandle_Success(
FlatStyle
flatStyle)
8536
[EnumData<
FlatStyle
>]
8537
public void ButtonBase_WndProc_InvokeKillFocusMousePressedLostFocusInButtonUpWithoutHandle_Success(
FlatStyle
flatStyle)
8585
[EnumData<
FlatStyle
>]
8586
public void ButtonBase_WndProc_InvokeKillFocusWithHandle_Success(
FlatStyle
flatStyle)
8631
[InlineData(
FlatStyle
.Flat, 2)]
8632
[InlineData(
FlatStyle
.Popup, 2)]
8633
[InlineData(
FlatStyle
.Standard, 2)]
8634
[InlineData(
FlatStyle
.System, 1)]
8635
public void ButtonBase_WndProc_InvokeKillFocusMousePressedWithHandle_Success(
FlatStyle
flatStyle, int expectedInvalidatedCallCount)
8681
[EnumData<
FlatStyle
>]
8682
public void ButtonBase_WndProc_InvokeKillFocusMousePressedLostFocusWithHandle_Success(
FlatStyle
flatStyle)
8729
[EnumData<
FlatStyle
>]
8730
public void ButtonBase_WndProc_InvokeKillFocusMousePressedInButtonUpWithHandle_Success(
FlatStyle
flatStyle)
8788
[EnumData<
FlatStyle
>]
8789
public void ButtonBase_WndProc_InvokeMouseHoverWithHandle_Success(
FlatStyle
flatStyle)
9095
yield return new object[] {
FlatStyle
.Flat, IntPtr.Zero, IntPtr.Zero, 0 };
9096
yield return new object[] {
FlatStyle
.Flat, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 };
9097
yield return new object[] {
FlatStyle
.Flat, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 };
9098
yield return new object[] {
FlatStyle
.Flat, PARAM.FromLowHigh(123, 456), IntPtr.Zero, 0 };
9100
yield return new object[] {
FlatStyle
.Popup, IntPtr.Zero, IntPtr.Zero, 0 };
9101
yield return new object[] {
FlatStyle
.Popup, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 };
9102
yield return new object[] {
FlatStyle
.Popup, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 };
9103
yield return new object[] {
FlatStyle
.Popup, PARAM.FromLowHigh(123, 456), IntPtr.Zero, 0 };
9105
yield return new object[] {
FlatStyle
.Standard, IntPtr.Zero, IntPtr.Zero, 0 };
9106
yield return new object[] {
FlatStyle
.Standard, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 };
9107
yield return new object[] {
FlatStyle
.Standard, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 };
9108
yield return new object[] {
FlatStyle
.Standard, PARAM.FromLowHigh(123, 456), IntPtr.Zero, 0 };
9110
yield return new object[] {
FlatStyle
.System, IntPtr.Zero, (IntPtr)250, 1 };
9111
yield return new object[] {
FlatStyle
.System, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
9112
yield return new object[] {
FlatStyle
.System, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
9113
yield return new object[] {
FlatStyle
.System, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 };
9118
public void ButtonBase_WndProc_InvokeReflectCommandWithoutHandle_Success(
FlatStyle
flatStyle, IntPtr wParam, IntPtr expectedResult, int expectedCallCount)
9149
public void ButtonBase_WndProc_InvokeReflectCommandWithHandle_Success(
FlatStyle
flatStyle, IntPtr wParam, IntPtr expectedResult, int expectedCallCount)
9187
yield return new object[] {
FlatStyle
.Flat, (IntPtr)250 };
9188
yield return new object[] {
FlatStyle
.Popup, (IntPtr)250 };
9189
yield return new object[] {
FlatStyle
.Standard, (IntPtr)250 };
9190
yield return new object[] {
FlatStyle
.System, IntPtr.Zero };
9195
public void ButtonBase_WndProc_InvokeSetStateWithoutHandle_Success(
FlatStyle
flatStyle, IntPtr expectedResult)
9218
public void ButtonBase_WndProc_InvokeSetStateWithHandle_Success(
FlatStyle
flatStyle, IntPtr expectedResult)
System\Windows\Forms\ButtonRenderingTests.cs (1)
229
button.FlatStyle =
FlatStyle
.Flat;
System\Windows\Forms\ButtonTests.cs (234)
69
Assert.Equal(
FlatStyle
.Standard, control.FlatStyle);
168
[InlineData(
FlatStyle
.Flat, true, 0x5601000B)]
169
[InlineData(
FlatStyle
.Flat, false, 0x5601000B)]
170
[InlineData(
FlatStyle
.Popup, true, 0x5601000B)]
171
[InlineData(
FlatStyle
.Popup, false, 0x5601000B)]
172
[InlineData(
FlatStyle
.Standard, true, 0x5601000B)]
173
[InlineData(
FlatStyle
.Standard, false, 0x5601000B)]
174
[InlineData(
FlatStyle
.System, true, 0x56012F01)]
175
[InlineData(
FlatStyle
.System, false, 0x56012F00)]
176
public void Button_CreateParams_GetIsDefault_ReturnsExpected(
FlatStyle
flatStyle, bool isDefault, int expectedStyle)
202
foreach (
FlatStyle
flatStyle in new
FlatStyle
[] {
FlatStyle
.Flat,
FlatStyle
.Popup,
FlatStyle
.Standard })
212
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.BottomLeft, 0x56012A00, 0x6000 };
213
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.BottomCenter, 0x56012B00, 0x6000 };
214
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.BottomRight, 0x56012900, 0x6000 };
215
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.MiddleLeft, 0x56012E00, 0x6000 };
216
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.MiddleCenter, 0x56012F00, 0x6000 };
217
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.MiddleRight, 0x56012D00, 0x6000 };
218
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.TopLeft, 0x56012600, 0x6000 };
219
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.TopCenter, 0x56012700, 0x6000 };
220
yield return new object[] {
FlatStyle
.System, RightToLeft.Yes, ContentAlignment.TopRight, 0x56012500, 0x6000 };
222
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.BottomLeft, 0x56012900, 0 };
223
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.BottomCenter, 0x56012B00, 0 };
224
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.BottomRight, 0x56012A00, 0 };
225
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.MiddleLeft, 0x56012D00, 0 };
226
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.MiddleCenter, 0x56012F00, 0 };
227
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.MiddleRight, 0x56012E00, 0 };
228
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.TopLeft, 0x56012500, 0 };
229
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.TopCenter, 0x56012700, 0 };
230
yield return new object[] {
FlatStyle
.System, RightToLeft.No, ContentAlignment.TopRight, 0x56012600, 0 };
232
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.BottomLeft, 0x56012900, 0 };
233
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.BottomCenter, 0x56012B00, 0 };
234
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.BottomRight, 0x56012A00, 0 };
235
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.MiddleLeft, 0x56012D00, 0 };
236
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.MiddleCenter, 0x56012F00, 0 };
237
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.MiddleRight, 0x56012E00, 0 };
238
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.TopLeft, 0x56012500, 0 };
239
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.TopCenter, 0x56012700, 0 };
240
yield return new object[] {
FlatStyle
.System, RightToLeft.Inherit, ContentAlignment.TopRight, 0x56012600, 0 };
245
public void Button_CreateParams_GetTextAlign_ReturnsExpected(
FlatStyle
flatStyle, RightToLeft rightToLeft, ContentAlignment textAlign, int expectedStyle, int expectedExStyle)
592
FlatStyle =
FlatStyle
.System,
693
FlatStyle =
FlatStyle
.System,
948
FlatStyle =
FlatStyle
.System,
996
[EnumData<
FlatStyle
>]
997
public void Button_CreateAccessibilityInstance_Invoke_ReturnsExpected_IfHandleIsNotCreated(
FlatStyle
flatStyle)
1016
[EnumData<
FlatStyle
>]
1017
public void Button_CreateAccessibilityInstance_Invoke_ReturnsExpected_IfHandleIsCreated(
FlatStyle
flatStyle)
1037
[InlineData(true,
FlatStyle
.Flat, AccessibleStates.Pressed | AccessibleStates.Focusable, AccessibleRole.PushButton)]
1038
[InlineData(true,
FlatStyle
.Popup, AccessibleStates.Pressed | AccessibleStates.Focusable, AccessibleRole.PushButton)]
1039
[InlineData(true,
FlatStyle
.Standard, AccessibleStates.Pressed | AccessibleStates.Focusable, AccessibleRole.PushButton)]
1040
[InlineData(true,
FlatStyle
.System, AccessibleStates.Focusable, AccessibleRole.PushButton)]
1041
[InlineData(false,
FlatStyle
.Flat, AccessibleStates.None, AccessibleRole.None)]
1042
[InlineData(false,
FlatStyle
.Popup, AccessibleStates.None, AccessibleRole.None)]
1043
[InlineData(false,
FlatStyle
.Standard, AccessibleStates.None, AccessibleRole.None)]
1044
[InlineData(false,
FlatStyle
.System, AccessibleStates.None, AccessibleRole.None)]
1045
public void Button_CreateAccessibilityInstance_InvokeMouseDown_ReturnsExpected(bool createControl,
FlatStyle
flatStyle, AccessibleStates expectedState, AccessibleRole expectedRole)
1071
[EnumData<
FlatStyle
>]
1072
public void Button_CreateAccessibilityInstance_InvokeWithCustomRole_ReturnsExpected_IfHandleIsCreated(
FlatStyle
flatStyle)
1093
[EnumData<
FlatStyle
>]
1094
public void Button_CreateAccessibilityInstance_InvokeWithCustomRole_ReturnsExpected_IfHandleIsNotCreated(
FlatStyle
flatStyle)
1114
[EnumData<
FlatStyle
>]
1115
public void Button_CreateAccessibilityInstance_InvokeDoDefaultAction_CallsOnClick_IfHandleIsCreated(
FlatStyle
flatStyle)
1137
[EnumData<
FlatStyle
>]
1138
public void Button_CreateAccessibilityInstance_InvokeDoDefaultAction_CallsOnClick_IfHandleIsNotCreated(
FlatStyle
flatStyle)
1201
FlatStyle =
FlatStyle
.System,
1250
FlatStyle =
FlatStyle
.System,
1300
FlatStyle =
FlatStyle
.System,
1333
FlatStyle =
FlatStyle
.System,
1357
FlatStyle =
FlatStyle
.System,
1376
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(8, 8) };
1377
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(8, 8) };
1378
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(8, 8) };
1379
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(8, 8) };
1380
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(8, 8) };
1381
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(8, 8) };
1382
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(8, 8) };
1383
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(8, 8) };
1384
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(8, 8) };
1385
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(8, 8) };
1386
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(8, 8) };
1387
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(8, 8) };
1389
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(6, 6) };
1390
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(6, 6) };
1391
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(6, 6) };
1392
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(6, 6) };
1393
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(6, 6) };
1394
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(6, 6) };
1395
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(6, 6) };
1396
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(6, 6) };
1397
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(6, 6) };
1398
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(6, 6) };
1399
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(6, 6) };
1400
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(6, 6) };
1402
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(6, 6) };
1403
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(6, 6) };
1404
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(6, 6) };
1405
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(6, 6) };
1406
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(6, 6) };
1407
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(6, 6) };
1408
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(6, 6) };
1409
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(6, 6) };
1410
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(6, 6) };
1411
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(6, 6) };
1412
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(6, 6) };
1413
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(6, 6) };
1415
foreach (
FlatStyle
flatStyle in new
FlatStyle
[] {
FlatStyle
.Flat,
FlatStyle
.Popup,
FlatStyle
.Standard })
1435
public void Button_GetPreferredSize_InvokeFlat_ReturnsExpected(
FlatStyle
flatStyle, AutoSizeMode autoSizeMode, Size proposedSize, Size expected)
1454
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(12, 14) };
1455
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(12, 14) };
1456
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(12, 14) };
1457
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(12, 14) };
1458
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(12, 14) };
1459
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(12, 14) };
1460
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(12, 14) };
1461
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(12, 14) };
1462
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(12, 14) };
1463
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(12, 14) };
1464
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(12, 14) };
1465
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(12, 14) };
1467
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(10, 12) };
1468
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(10, 12) };
1469
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(10, 12) };
1470
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(10, 12) };
1471
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(10, 12) };
1472
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(10, 12) };
1473
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(10, 12) };
1474
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(10, 12) };
1475
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(10, 12) };
1476
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(10, 12) };
1477
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(10, 12) };
1478
yield return new object[] {
FlatStyle
.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) };
1480
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(10, 12) };
1481
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(10, 12) };
1482
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(10, 12) };
1483
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(10, 12) };
1484
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(10, 12) };
1485
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(10, 12) };
1486
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(10, 12) };
1487
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(10, 12) };
1488
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(10, 12) };
1489
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(10, 12) };
1490
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(10, 12) };
1491
yield return new object[] {
FlatStyle
.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) };
1493
foreach (
FlatStyle
flatStyle in new
FlatStyle
[] {
FlatStyle
.Flat,
FlatStyle
.Popup,
FlatStyle
.Standard })
1513
public void Button_GetPreferredSize_InvokeFlatWithPadding_ReturnsExpected(
FlatStyle
flatStyle, AutoSizeMode autoSizeMode, Size proposedSize, Size expected)
1533
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, Size.Empty, new Size(12, 14) };
1534
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -2), new Size(12, 14) };
1535
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(-2, -1), new Size(12, 14) };
1536
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(-1, -1), new Size(12, 14) };
1537
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 2), new Size(12, 14) };
1538
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(2, 1), new Size(12, 14) };
1539
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(1, 1), new Size(12, 14) };
1540
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(10, 20), new Size(12, 14) };
1541
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(30, 40), new Size(12, 14) };
1542
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(12, 14) };
1543
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(12, 14) };
1544
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(12, 14) };
1546
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, Size.Empty, new Size(12, 14) };
1547
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(-1, -2), new Size(12, 14) };
1548
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(-2, -1), new Size(12, 14) };
1549
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(-1, -1), new Size(12, 14) };
1550
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(1, 2), new Size(12, 14) };
1551
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(2, 1), new Size(12, 14) };
1552
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(1, 1), new Size(12, 14) };
1553
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(10, 20), new Size(12, 14) };
1554
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(30, 40), new Size(12, 14) };
1555
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(12, 14) };
1556
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(12, 14) };
1557
yield return new object[] {
FlatStyle
.Flat, AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(12, 14) };
1559
foreach (
FlatStyle
flatStyle in new
FlatStyle
[] {
FlatStyle
.Popup,
FlatStyle
.Standard })
1592
public void Button_GetPreferredSize_InvokeFlatWithPaddingSmallSize_ReturnsExpected(
FlatStyle
flatStyle, AutoSizeMode autoSizeMode, Size proposedSize, Size expected)
1629
FlatStyle =
FlatStyle
.Flat,
1653
FlatStyle =
FlatStyle
.Flat,
1677
FlatStyle =
FlatStyle
.Popup,
1701
FlatStyle =
FlatStyle
.Popup,
1725
FlatStyle =
FlatStyle
.Standard,
1749
FlatStyle =
FlatStyle
.Standard,
1805
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
1814
public void Button_NotifyDefault_Invoke_GetReturnsExpected(
FlatStyle
flatStyle, bool value)
1838
yield return new object[] {
FlatStyle
.Flat, true, 1, 0, 2, 0 };
1839
yield return new object[] {
FlatStyle
.Popup, true, 1, 0, 2, 0 };
1840
yield return new object[] {
FlatStyle
.Standard, true, 1, 0, 2, 0 };
1841
yield return new object[] {
FlatStyle
.System, true, 1, 1, 2, 2 };
1843
yield return new object[] {
FlatStyle
.Flat, false, 0, 0, 1, 0 };
1844
yield return new object[] {
FlatStyle
.Popup, false, 0, 0, 1, 0 };
1845
yield return new object[] {
FlatStyle
.Standard, false, 0, 0, 1, 0 };
1846
yield return new object[] {
FlatStyle
.System, false, 0, 0, 1, 1 };
1851
public void Button_NotifyDefault_InvokeWithHandle_GetReturnsExpected(
FlatStyle
flatStyle, bool value, int expectedInvalidatedCallCount1, int expectedStyleChangeCallCount1, int expectedInvalidatedCallCount2, int expectedStyleChangeCallCount2)
2641
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
2656
public void Button_OnMouseUp_Invoke_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs)
2693
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
2708
public void Button_OnMouseUp_InvokeMouseDown_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs, bool expectedIsHandleCreated)
2746
public void Button_OnMouseUp_InvokeWithHandle_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs)
2796
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
2798
int expectedCallCount = flatStyle !=
FlatStyle
.System ? 1 : 0;
2812
public void Button_OnMouseUp_InvokeMouseDownWithHandle_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs, int expectedInvalidatedCallCount)
3522
[EnumData<
FlatStyle
>]
3523
public void Button_WndProc_InvokeMouseHoverWithHandle_Success(
FlatStyle
flatStyle)
3560
yield return new object[] {
FlatStyle
.Flat, IntPtr.Zero, (IntPtr)250, 1 };
3561
yield return new object[] {
FlatStyle
.Flat, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
3562
yield return new object[] {
FlatStyle
.Flat, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
3563
yield return new object[] {
FlatStyle
.Flat, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 };
3565
yield return new object[] {
FlatStyle
.Popup, IntPtr.Zero, (IntPtr)250, 1 };
3566
yield return new object[] {
FlatStyle
.Popup, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
3567
yield return new object[] {
FlatStyle
.Popup, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
3568
yield return new object[] {
FlatStyle
.Popup, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 };
3570
yield return new object[] {
FlatStyle
.Standard, IntPtr.Zero, (IntPtr)250, 1 };
3571
yield return new object[] {
FlatStyle
.Standard, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
3572
yield return new object[] {
FlatStyle
.Standard, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
3573
yield return new object[] {
FlatStyle
.Standard, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 };
3575
yield return new object[] {
FlatStyle
.System, IntPtr.Zero, (IntPtr)250, 1 };
3576
yield return new object[] {
FlatStyle
.System, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
3577
yield return new object[] {
FlatStyle
.System, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 };
3578
yield return new object[] {
FlatStyle
.System, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 };
3594
public void Button_WndProc_InvokeReflectCommandWithoutHandle_Success(
FlatStyle
flatStyle, IntPtr wParam, IntPtr expectedResult, int expectedCallCount)
3627
public void Button_WndProc_InvokeReflectCommandWithHandle_Success(
FlatStyle
flatStyle, IntPtr wParam, IntPtr expectedResult, int expectedCallCount)
System\Windows\Forms\CheckBoxTests.cs (12)
70
Assert.Equal(
FlatStyle
.Standard, control.FlatStyle);
776
yield return new object[] { Appearance.Button,
FlatStyle
.Standard };
777
yield return new object[] { Appearance.Button,
FlatStyle
.Flat };
778
yield return new object[] { Appearance.Button,
FlatStyle
.Popup };
779
yield return new object[] { Appearance.Button,
FlatStyle
.System };
780
yield return new object[] { Appearance.Normal,
FlatStyle
.Standard };
781
yield return new object[] { Appearance.Normal,
FlatStyle
.Flat };
782
yield return new object[] { Appearance.Normal,
FlatStyle
.Popup };
783
yield return new object[] { Appearance.Normal,
FlatStyle
.System };
788
public void CheckBox_OverChangeRectangle_Get(Appearance appearance,
FlatStyle
flatStyle) => base.ButtonBase_OverChangeRectangle_Get(appearance, flatStyle);
792
public void CheckBox_DownChangeRectangle_ReturnsExpectedRectangle(Appearance appearance,
FlatStyle
flatStyle)
800
if (appearance == Appearance.Button || flatStyle ==
FlatStyle
.System)
System\Windows\Forms\ComboBoxTests.cs (73)
77
Assert.Equal(
FlatStyle
.Standard, control.FlatStyle);
1773
yield return new object[] {
FlatStyle
.Flat, false, true, allPaintingInWmPaint, true, 0 };
1774
yield return new object[] {
FlatStyle
.Popup, false, true, allPaintingInWmPaint, true, 0 };
1775
yield return new object[] {
FlatStyle
.Standard, false, true, allPaintingInWmPaint, false, 0 };
1776
yield return new object[] {
FlatStyle
.System, false, true, allPaintingInWmPaint, false, 0 };
1777
yield return new object[] {
FlatStyle
.Flat, false, false, allPaintingInWmPaint, true, 0 };
1778
yield return new object[] {
FlatStyle
.Popup, false, false, allPaintingInWmPaint, true, 0 };
1779
yield return new object[] {
FlatStyle
.Standard, false, false, allPaintingInWmPaint, false, 0 };
1780
yield return new object[] {
FlatStyle
.System, false, false, allPaintingInWmPaint, false, 0 };
1782
yield return new object[] {
FlatStyle
.Flat, true, true, allPaintingInWmPaint, true, 0 };
1783
yield return new object[] {
FlatStyle
.Popup, true, true, allPaintingInWmPaint, true, 0 };
1784
yield return new object[] {
FlatStyle
.Standard, true, true, allPaintingInWmPaint, true, 0 };
1785
yield return new object[] {
FlatStyle
.System, true, true, allPaintingInWmPaint, true, 0 };
1786
yield return new object[] {
FlatStyle
.Flat, true, false, allPaintingInWmPaint, true, 1 };
1787
yield return new object[] {
FlatStyle
.Popup, true, false, allPaintingInWmPaint, true, 1 };
1788
yield return new object[] {
FlatStyle
.Standard, true, false, allPaintingInWmPaint, true, 1 };
1789
yield return new object[] {
FlatStyle
.System, true, false, allPaintingInWmPaint, true, 1 };
1795
public void ComboBox_WndProc_InvokePaintWithoutWParam_Success(
FlatStyle
flatStyle, bool userPaint, bool doubleBuffered, bool allPaintingInWmPaint, bool expectedIsHandleCreated, int expectedPaintCallCount)
1821
public void ComboBox_WndProc_InvokePaintWithoutWParamWithBounds_Success(
FlatStyle
flatStyle, bool userPaint, bool doubleBuffered, bool allPaintingInWmPaint, bool expectedIsHandleCreated, int expectedPaintCallCount)
1850
yield return new object[] {
FlatStyle
.Flat, false, true, allPaintingInWmPaint, 0 };
1851
yield return new object[] {
FlatStyle
.Popup, false, true, allPaintingInWmPaint, 0 };
1852
yield return new object[] {
FlatStyle
.Standard, false, true, allPaintingInWmPaint, 0 };
1853
yield return new object[] {
FlatStyle
.System, false, true, allPaintingInWmPaint, 0 };
1854
yield return new object[] {
FlatStyle
.Flat, false, false, allPaintingInWmPaint, 0 };
1855
yield return new object[] {
FlatStyle
.Popup, false, false, allPaintingInWmPaint, 0 };
1856
yield return new object[] {
FlatStyle
.Standard, false, false, allPaintingInWmPaint, 0 };
1857
yield return new object[] {
FlatStyle
.System, false, false, allPaintingInWmPaint, 0 };
1859
yield return new object[] {
FlatStyle
.Flat, true, true, allPaintingInWmPaint, 0 };
1860
yield return new object[] {
FlatStyle
.Popup, true, true, allPaintingInWmPaint, 0 };
1861
yield return new object[] {
FlatStyle
.Standard, true, true, allPaintingInWmPaint, 0 };
1862
yield return new object[] {
FlatStyle
.System, true, true, allPaintingInWmPaint, 0 };
1863
yield return new object[] {
FlatStyle
.Flat, true, false, allPaintingInWmPaint, 1 };
1864
yield return new object[] {
FlatStyle
.Popup, true, false, allPaintingInWmPaint, 1 };
1865
yield return new object[] {
FlatStyle
.Standard, true, false, allPaintingInWmPaint, 1 };
1866
yield return new object[] {
FlatStyle
.System, true, false, allPaintingInWmPaint, 1 };
1872
public void ComboBox_WndProc_InvokePaintWithoutWParamWithHandle_Success(
FlatStyle
flatStyle, bool userPaint, bool doubleBuffered, bool allPaintingInWmPaint, int expectedPaintCallCount)
1905
public void ComboBox_WndProc_InvokePaintWithoutWParamWithBoundsWithHandle_Success(
FlatStyle
flatStyle, bool userPaint, bool doubleBuffered, bool allPaintingInWmPaint, int expectedPaintCallCount)
1941
yield return new object[] {
FlatStyle
.Flat, false, true, allPaintingInWmPaint, true, 0 };
1942
yield return new object[] {
FlatStyle
.Popup, false, true, allPaintingInWmPaint, true, 0 };
1943
yield return new object[] {
FlatStyle
.Standard, false, true, allPaintingInWmPaint, false, 0 };
1944
yield return new object[] {
FlatStyle
.System, false, true, allPaintingInWmPaint, false, 0 };
1945
yield return new object[] {
FlatStyle
.Flat, false, false, allPaintingInWmPaint, true, 0 };
1946
yield return new object[] {
FlatStyle
.Popup, false, false, allPaintingInWmPaint, true, 0 };
1947
yield return new object[] {
FlatStyle
.Standard, false, false, allPaintingInWmPaint, false, 0 };
1948
yield return new object[] {
FlatStyle
.System, false, false, allPaintingInWmPaint, false, 0 };
1950
yield return new object[] {
FlatStyle
.Flat, true, true, allPaintingInWmPaint, false, 1 };
1951
yield return new object[] {
FlatStyle
.Popup, true, true, allPaintingInWmPaint, false, 1 };
1952
yield return new object[] {
FlatStyle
.Standard, true, true, allPaintingInWmPaint, false, 1 };
1953
yield return new object[] {
FlatStyle
.System, true, true, allPaintingInWmPaint, false, 1 };
1954
yield return new object[] {
FlatStyle
.Flat, true, false, allPaintingInWmPaint, false, 1 };
1955
yield return new object[] {
FlatStyle
.Popup, true, false, allPaintingInWmPaint, false, 1 };
1956
yield return new object[] {
FlatStyle
.Standard, true, false, allPaintingInWmPaint, false, 1 };
1957
yield return new object[] {
FlatStyle
.System, true, false, allPaintingInWmPaint, false, 1 };
1963
public void ComboBox_WndProc_InvokePaintWithWParam_Success(
FlatStyle
flatStyle, bool userPaint, bool doubleBuffered, bool allPaintingInWmPaint, bool expectedIsHandleCreated, int expectedPaintCallCount)
2000
public void ComboBox_WndProc_InvokePaintWithWParamWithBounds_Success(
FlatStyle
flatStyle, bool userPaint, bool doubleBuffered, bool allPaintingInWmPaint, bool expectedIsHandleCreated, int expectedPaintCallCount)
2040
yield return new object[] {
FlatStyle
.Flat, false, true, allPaintingInWmPaint, 0 };
2041
yield return new object[] {
FlatStyle
.Popup, false, true, allPaintingInWmPaint, 0 };
2042
yield return new object[] {
FlatStyle
.Standard, false, true, allPaintingInWmPaint, 0 };
2043
yield return new object[] {
FlatStyle
.System, false, true, allPaintingInWmPaint, 0 };
2044
yield return new object[] {
FlatStyle
.Flat, false, false, allPaintingInWmPaint, 0 };
2045
yield return new object[] {
FlatStyle
.Popup, false, false, allPaintingInWmPaint, 0 };
2046
yield return new object[] {
FlatStyle
.Standard, false, false, allPaintingInWmPaint, 0 };
2047
yield return new object[] {
FlatStyle
.System, false, false, allPaintingInWmPaint, 0 };
2049
yield return new object[] {
FlatStyle
.Flat, true, true, allPaintingInWmPaint, 1 };
2050
yield return new object[] {
FlatStyle
.Popup, true, true, allPaintingInWmPaint, 1 };
2051
yield return new object[] {
FlatStyle
.Standard, true, true, allPaintingInWmPaint, 1 };
2052
yield return new object[] {
FlatStyle
.System, true, true, allPaintingInWmPaint, 1 };
2053
yield return new object[] {
FlatStyle
.Flat, true, false, allPaintingInWmPaint, 1 };
2054
yield return new object[] {
FlatStyle
.Popup, true, false, allPaintingInWmPaint, 1 };
2055
yield return new object[] {
FlatStyle
.Standard, true, false, allPaintingInWmPaint, 1 };
2056
yield return new object[] {
FlatStyle
.System, true, false, allPaintingInWmPaint, 1 };
2062
public void ComboBox_WndProc_InvokePaintWithWParamWithHandle_Success(
FlatStyle
flatStyle, bool userPaint, bool doubleBuffered, bool allPaintingInWmPaint, int expectedPaintCallCount)
2106
public void ComboBox_WndProc_InvokePaintWithWParamWithBoundsWithHandle_Success(
FlatStyle
flatStyle, bool userPaint, bool doubleBuffered, bool allPaintingInWmPaint, int expectedPaintCallCount)
System\Windows\Forms\GroupBoxTests.cs (136)
62
Assert.Equal(
FlatStyle
.Standard, control.FlatStyle);
127
[InlineData(
FlatStyle
.Flat, null, 0x56000000)]
128
[InlineData(
FlatStyle
.Popup, null, 0x56000000)]
129
[InlineData(
FlatStyle
.Standard, null, 0x56000000)]
130
[InlineData(
FlatStyle
.System, "Button", 0x56000007)]
131
public void GroupBox_CreateParams_GetFlatStyle_ReturnsExpected(
FlatStyle
flatStyle, string expectedClassName, int expectedStyle)
618
[InlineData(
FlatStyle
.Flat, true, true, true)]
619
[InlineData(
FlatStyle
.Popup, true, true, true)]
620
[InlineData(
FlatStyle
.Standard, false, true, false)]
621
[InlineData(
FlatStyle
.System, true, false, false)]
622
public void GroupBox_FlatStyle_Set_GetReturnsExpected(
FlatStyle
value, bool containerControl, bool ownerDraw, bool userMouse)
648
[InlineData(
FlatStyle
.Flat,
FlatStyle
.Flat, false, true, true)]
649
[InlineData(
FlatStyle
.Flat,
FlatStyle
.Popup, true, true, true)]
650
[InlineData(
FlatStyle
.Flat,
FlatStyle
.Standard, true, true, true)]
651
[InlineData(
FlatStyle
.Flat,
FlatStyle
.System, true, false, false)]
652
[InlineData(
FlatStyle
.Popup,
FlatStyle
.Flat, true, true, true)]
653
[InlineData(
FlatStyle
.Popup,
FlatStyle
.Popup, false, true, true)]
654
[InlineData(
FlatStyle
.Popup,
FlatStyle
.Standard, true, true, true)]
655
[InlineData(
FlatStyle
.Popup,
FlatStyle
.System, true, false, false)]
656
[InlineData(
FlatStyle
.Standard,
FlatStyle
.Flat, true, true, true)]
657
[InlineData(
FlatStyle
.Standard,
FlatStyle
.Popup, true, true, true)]
658
[InlineData(
FlatStyle
.Standard,
FlatStyle
.Standard, false, true, false)]
659
[InlineData(
FlatStyle
.Standard,
FlatStyle
.System, true, false, false)]
660
[InlineData(
FlatStyle
.System,
FlatStyle
.Flat, true, true, true)]
661
[InlineData(
FlatStyle
.System,
FlatStyle
.Popup, true, true, true)]
662
[InlineData(
FlatStyle
.System,
FlatStyle
.Standard, true, true, true)]
663
[InlineData(
FlatStyle
.System,
FlatStyle
.System, false, false, false)]
664
public void GroupBox_FlatStyle_SetWithCustomOldValue_GetReturnsExpected(
FlatStyle
oldValue,
FlatStyle
value, bool containerControl, bool ownerDraw, bool userMouse)
693
[InlineData(
FlatStyle
.Flat, true, true, true, 1, 0)]
694
[InlineData(
FlatStyle
.Popup, true, true, true, 1, 0)]
695
[InlineData(
FlatStyle
.Standard, false, true, false, 0, 0)]
696
[InlineData(
FlatStyle
.System, true, false, false, 0, 1)]
697
public void GroupBox_FlatStyle_VisualStyles_off_SetWithHandle_GetReturnsExpected(
FlatStyle
value, bool containerControl, bool ownerDraw, bool userMouse, int expectedInvalidatedCallCount, int expectedCreatedCallCount)
741
[InlineData(
FlatStyle
.Flat, true, true, true, 1, 0)]
742
[InlineData(
FlatStyle
.Popup, true, true, true, 1, 0)]
743
[InlineData(
FlatStyle
.Standard, false, true, false, 0, 0)]
744
[InlineData(
FlatStyle
.System, true, false, false, 1, 1)]
746
FlatStyle
value,
795
[InlineData(
FlatStyle
.Flat,
FlatStyle
.Flat, false, true, true, 0, 0)]
796
[InlineData(
FlatStyle
.Flat,
FlatStyle
.Popup, true, true, true, 1, 0)]
797
[InlineData(
FlatStyle
.Flat,
FlatStyle
.Standard, true, true, true, 1, 0)]
798
[InlineData(
FlatStyle
.Flat,
FlatStyle
.System, true, false, false, 0, 1)]
799
[InlineData(
FlatStyle
.Popup,
FlatStyle
.Flat, true, true, true, 1, 0)]
800
[InlineData(
FlatStyle
.Popup,
FlatStyle
.Popup, false, true, true, 0, 0)]
801
[InlineData(
FlatStyle
.Popup,
FlatStyle
.Standard, true, true, true, 1, 0)]
802
[InlineData(
FlatStyle
.Popup,
FlatStyle
.System, true, false, false, 0, 1)]
803
[InlineData(
FlatStyle
.Standard,
FlatStyle
.Flat, true, true, true, 1, 0)]
804
[InlineData(
FlatStyle
.Standard,
FlatStyle
.Popup, true, true, true, 1, 0)]
805
[InlineData(
FlatStyle
.Standard,
FlatStyle
.Standard, false, true, false, 0, 0)]
806
[InlineData(
FlatStyle
.Standard,
FlatStyle
.System, true, false, false, 0, 1)]
807
[InlineData(
FlatStyle
.System,
FlatStyle
.Flat, true, true, true, 0, 1)]
808
[InlineData(
FlatStyle
.System,
FlatStyle
.Popup, true, true, true, 0, 1)]
809
[InlineData(
FlatStyle
.System,
FlatStyle
.Standard, true, true, true, 0, 1)]
810
[InlineData(
FlatStyle
.System,
FlatStyle
.System, false, false, false, 0, 0)]
811
public void GroupBox_FlatStyle_VisualStyles_off_SetWithCustomOldValueWithHandle_GetReturnsExpected(
FlatStyle
oldValue,
FlatStyle
value, bool containerControl, bool ownerDraw, bool userMouse, int expectedInvalidatedCallCount, int expectedCreatedCallCount)
858
[InlineData(
FlatStyle
.Flat,
FlatStyle
.Flat, false, true, true, 0, 0)]
859
[InlineData(
FlatStyle
.Flat,
FlatStyle
.Popup, true, true, true, 1, 0)]
860
[InlineData(
FlatStyle
.Flat,
FlatStyle
.Standard, true, true, true, 1, 0)]
861
[InlineData(
FlatStyle
.Flat,
FlatStyle
.System, true, false, false, 0, 1)]
862
[InlineData(
FlatStyle
.Popup,
FlatStyle
.Flat, true, true, true, 1, 0)]
863
[InlineData(
FlatStyle
.Popup,
FlatStyle
.Popup, false, true, true, 0, 0)]
864
[InlineData(
FlatStyle
.Popup,
FlatStyle
.Standard, true, true, true, 1, 0)]
865
[InlineData(
FlatStyle
.Popup,
FlatStyle
.System, true, false, false, 0, 1)]
866
[InlineData(
FlatStyle
.Standard,
FlatStyle
.Flat, true, true, true, 1, 0)]
867
[InlineData(
FlatStyle
.Standard,
FlatStyle
.Popup, true, true, true, 1, 0)]
868
[InlineData(
FlatStyle
.Standard,
FlatStyle
.Standard, false, true, false, 0, 0)]
869
[InlineData(
FlatStyle
.Standard,
FlatStyle
.System, true, false, false, 0, 1)]
870
[InlineData(
FlatStyle
.System,
FlatStyle
.Flat, true, true, true, 0, 1)]
871
[InlineData(
FlatStyle
.System,
FlatStyle
.Popup, true, true, true, 0, 1)]
872
[InlineData(
FlatStyle
.System,
FlatStyle
.Standard, true, true, true, 0, 1)]
873
[InlineData(
FlatStyle
.System,
FlatStyle
.System, false, false, false, 0, 0)]
874
public void GroupBox_FlatStyle_VisualStyles_on_SetWithCustomOldValue_GetReturnsExpected(
FlatStyle
oldValue,
FlatStyle
value, bool containerControl, bool ownerDraw, bool userMouse, int expectedInvalidatedCallCount, int expectedCreatedCallCount)
2085
FlatStyle =
FlatStyle
.System
2115
FlatStyle =
FlatStyle
.System
2156
FlatStyle =
FlatStyle
.System
2169
[InlineData(
FlatStyle
.Flat)]
2170
[InlineData(
FlatStyle
.Popup)]
2171
[InlineData(
FlatStyle
.Standard)]
2172
public void GroupBox_WndProc_InvokeEraseBkgndOwnerDrawWithHandleWithWParam_Success(
FlatStyle
flatStyle)
2214
[InlineData(
FlatStyle
.Flat)]
2215
[InlineData(
FlatStyle
.Popup)]
2216
[InlineData(
FlatStyle
.Standard)]
2217
public void GroupBox_WndProc_InvokePrintClientOwnerDrawWithHandleWithWParam_Success(
FlatStyle
flatStyle)
2259
[EnumData<
FlatStyle
>]
2260
public void GroupBox_WndProc_InvokeMouseHoverWithHandle_Success(
FlatStyle
flatStyle)
System\Windows\Forms\LabelTests.cs (9)
62
Assert.Equal(
FlatStyle
.Standard, control.FlatStyle);
350
[InlineData(
FlatStyle
.System)]
351
[InlineData(
FlatStyle
.Popup)]
352
[InlineData(
FlatStyle
.Standard)]
353
[InlineData(
FlatStyle
.Flat)]
354
public void Label_FlatStyle_Set_GetReturnsExpected(
FlatStyle
style)
371
if (style !=
FlatStyle
.Flat)
373
label.FlatStyle =
FlatStyle
.Flat;
376
Assert.Equal(
FlatStyle
.Flat, label.FlatStyle);
System\Windows\Forms\RadioButtonTests.cs (62)
69
Assert.Equal(
FlatStyle
.Standard, control.FlatStyle);
302
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
314
public void RadioRadioButton_TextAlign_Set_GetReturnsExpected(bool autoSize,
FlatStyle
flatStyle, ContentAlignment value)
343
yield return new object[] { autoSize,
FlatStyle
.Flat, value, expectedCallCount, 0 };
344
yield return new object[] { autoSize,
FlatStyle
.Popup, value, expectedCallCount, 0 };
345
yield return new object[] { autoSize,
FlatStyle
.Standard, value, expectedCallCount, 0 };
346
yield return new object[] { autoSize,
FlatStyle
.System, value, expectedCallCount, expectedCallCount };
353
public void RadioRadioButton_TextAlign_SetWithHandle_GetReturnsExpected(bool autoSize,
FlatStyle
flatStyle, ContentAlignment value, int expectedInvalidatedCallCount, int expectedStyleChangedCallCount)
397
[EnumData<
FlatStyle
>]
398
public void RadioButton_CreateAccessibilityInstance_Invoke_ReturnsExpected_IfHandleIsCreated(
FlatStyle
flatStyle)
419
[EnumData<
FlatStyle
>]
420
public void RadioButton_CreateAccessibilityInstance_Invoke_ReturnsExpected_IfHandleIsNotCreated(
FlatStyle
flatStyle)
440
[EnumData<
FlatStyle
>]
441
public void RadioButton_CreateAccessibilityInstance_InvokeWithCustomRole_ReturnsExpected_IfHandleIsCreated(
FlatStyle
flatStyle)
463
[EnumData<
FlatStyle
>]
464
public void RadioButton_CreateAccessibilityInstance_InvokeWithCustomRole_ReturnsExpected_IfHandleIsNotCreated(
FlatStyle
flatStyle)
485
[InlineData(
FlatStyle
.Flat, "", true, AccessibleStates.Focusable)]
486
[InlineData(
FlatStyle
.Popup, "", true, AccessibleStates.Focusable)]
487
[InlineData(
FlatStyle
.Standard, "", true, AccessibleStates.Focusable)]
488
[InlineData(
FlatStyle
.System, "", true, AccessibleStates.Focusable)]
489
[InlineData(
FlatStyle
.Flat, "Description", true, AccessibleStates.Focusable)]
490
[InlineData(
FlatStyle
.Popup, "Description", true, AccessibleStates.Focusable)]
491
[InlineData(
FlatStyle
.Standard, "Description", true, AccessibleStates.Focusable)]
492
[InlineData(
FlatStyle
.System, "Description", true, AccessibleStates.Focusable)]
493
[InlineData(
FlatStyle
.Flat, "", false, AccessibleStates.None)]
494
[InlineData(
FlatStyle
.Popup, "", false, AccessibleStates.None)]
495
[InlineData(
FlatStyle
.Standard, "", false, AccessibleStates.None)]
496
[InlineData(
FlatStyle
.System, "", false, AccessibleStates.None)]
497
[InlineData(
FlatStyle
.Flat, "Description", false, AccessibleStates.None)]
498
[InlineData(
FlatStyle
.Popup, "Description", false, AccessibleStates.None)]
499
[InlineData(
FlatStyle
.Standard, "Description", false, AccessibleStates.None)]
500
[InlineData(
FlatStyle
.System, "Description", false, AccessibleStates.None)]
501
public void RadioButton_CreateAccessibilityInstance_InvokeWithCustomDefaultActionDescription_ReturnsExpected(
FlatStyle
flatStyle, string defaultActionDescription, bool createControl, AccessibleStates expectedAccessibleStates)
527
[EnumData<
FlatStyle
>]
528
public void RadioButton_CreateAccessibilityInstance_InvokeChecked_ReturnsExpected_IfHandleIsCreated(
FlatStyle
flatStyle)
550
[EnumData<
FlatStyle
>]
551
public void RadioButton_CreateAccessibilityInstance_InvokeChecked_ReturnsExpected_IfHandleIsNotCreated(
FlatStyle
flatStyle)
572
[EnumData<
FlatStyle
>]
573
public void RadioButton_CreateAccessibilityInstance_InvokeDoDefaultAction_CallsOnClick_IfHandleIsCreated(
FlatStyle
flatStyle)
594
[EnumData<
FlatStyle
>]
595
public void RadioButton_CreateAccessibilityInstance_InvokeDoDefaultAction_CallsOnClick_IfHandleIsNotCreated(
FlatStyle
flatStyle)
1046
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
1061
public void RadioButton_OnMouseUp_Invoke_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs)
1098
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
1100
bool expectedIsHandleCreated = flatStyle !=
FlatStyle
.System;
1114
public void RadioButton_OnMouseUp_InvokeMouseDown_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs, bool expectedIsHandleCreated)
1152
public void RadioButton_OnMouseUp_InvokeWithHandle_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs)
1202
foreach (
FlatStyle
flatStyle in Enum.GetValues(typeof(
FlatStyle
)))
1217
public void RadioButton_OnMouseUp_InvokeMouseDownWithHandle_CallsMouseUp(
FlatStyle
flatStyle, MouseEventArgs eventArgs)
1656
[InlineData(Appearance.Button,
FlatStyle
.Standard)]
1657
[InlineData(Appearance.Button,
FlatStyle
.Flat)]
1658
[InlineData(Appearance.Button,
FlatStyle
.Popup)]
1659
[InlineData(Appearance.Button,
FlatStyle
.System)]
1660
[InlineData(Appearance.Normal,
FlatStyle
.Standard)]
1661
[InlineData(Appearance.Normal,
FlatStyle
.Flat)]
1662
[InlineData(Appearance.Normal,
FlatStyle
.Popup)]
1663
[InlineData(Appearance.Normal,
FlatStyle
.System)]
1664
public void RadioButton_OverChangeRectangle_Get(Appearance appearance,
FlatStyle
flatStyle) => base.ButtonBase_OverChangeRectangle_Get(appearance, flatStyle);
System\Windows\Forms\ToolStripComboBoxTests.cs (5)
172
[InlineData(
FlatStyle
.Flat)]
173
[InlineData(
FlatStyle
.Popup)]
174
[InlineData(
FlatStyle
.Standard)]
175
[InlineData(
FlatStyle
.System)]
176
public void ToolStripComboBox_FlatStyle_SetAndGet(
FlatStyle
style)
WinFormsControlsTest (23)
Buttons.cs (8)
11
private readonly
FlatStyle
[] _styles =
13
FlatStyle
.Flat,
14
FlatStyle
.Popup,
15
FlatStyle
.Standard,
16
FlatStyle
.System
48
foreach (
FlatStyle
style in _styles)
69
foreach (
FlatStyle
style in _styles)
90
foreach (
FlatStyle
style in _styles)
ComboBoxes.Designer.cs (10)
54
this.comboBox1.FlatStyle = System.Windows.Forms.
FlatStyle
.System;
68
this.comboBox2.FlatStyle = System.Windows.Forms.
FlatStyle
.System;
120
this.comboBox5.FlatStyle = System.Windows.Forms.
FlatStyle
.Popup;
132
this.comboBox6.FlatStyle = System.Windows.Forms.
FlatStyle
.Popup;
144
this.comboBox7.FlatStyle = System.Windows.Forms.
FlatStyle
.Flat;
157
this.comboBox8.FlatStyle = System.Windows.Forms.
FlatStyle
.Flat;
170
this.comboBox9.FlatStyle = System.Windows.Forms.
FlatStyle
.Flat;
183
this.comboBox10.FlatStyle = System.Windows.Forms.
FlatStyle
.Popup;
210
this.comboBox12.FlatStyle = System.Windows.Forms.
FlatStyle
.System;
230
this.dataBoundComboBox.FlatStyle = System.Windows.Forms.
FlatStyle
.System;
CustomComCtl32Button.cs (3)
25
FlatStyle =
FlatStyle
.Standard,
35
FlatStyle =
FlatStyle
.Standard,
45
FlatStyle =
FlatStyle
.Standard,
MultipleControls.Designer.cs (2)
78
this.button1.FlatStyle = System.Windows.Forms.
FlatStyle
.System;
92
this.label1.FlatStyle = System.Windows.Forms.
FlatStyle
.System;