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