265 references to FlatStyle
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.cs (3)
522
button.FlatStyle =
FlatStyle
.Flat;
801
button?.FlatStyle =
FlatStyle
.Standard;
814
button?.FlatStyle =
FlatStyle
.Flat;
System.Windows.Forms (238)
_generated\1\Validation.cs (2)
72
public static void Validate(System.Windows.Forms.
FlatStyle
enumToValidate, string parameterName = "value")
76
ReportEnumValidationError(parameterName, intValue, typeof(System.Windows.Forms.
FlatStyle
));
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 (11)
21
private
FlatStyle
_flatStyle =
FlatStyle
.Standard;
49
private
FlatStyle
_cachedAdapterType;
343
public partial
FlatStyle
FlatStyle
617
if (FlatStyle ==
FlatStyle
.Standard)
636
FlatStyle !=
FlatStyle
.System;
993
case
FlatStyle
.Standard:
996
case
FlatStyle
.Popup:
999
case
FlatStyle
.Flat:
1039
=> FlatStyle ==
FlatStyle
.Popup
1052
_cachedAdapterType = (
FlatStyle
)(-1);
System\Windows\Forms\Controls\Buttons\ButtonBase.FlatStyle.Docs.cs (6)
15
/// In an effective .NET 11-or-later visual-styles mode, <see cref="
FlatStyle
.Standard"/>,
16
/// <see cref="
FlatStyle
.Flat"/>, and <see cref="
FlatStyle
.Popup"/> select framework-defined modern
21
/// <see cref="
FlatStyle
.System"/> requests the native control and is not modernized. A two-state
30
[DefaultValue(
FlatStyle
.Standard)]
33
public partial
FlatStyle
FlatStyle { get; set; }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
707
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\ButtonInternal\CheckBoxModernAdapter.cs (4)
13
private readonly
FlatStyle
_flatStyle;
15
internal CheckBoxModernAdapter(CheckBox control,
FlatStyle
flatStyle) : base(control)
56
FlatStyle
.Flat => DarkModeAdapterFactory.CreateFlatAdapter(Control),
57
FlatStyle
.Popup => DarkModeAdapterFactory.CreatePopupAdapter(Control),
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeAdapter.cs (5)
23
FlatStyle
.Standard => _modern ? new ModernButtonDarkModeRenderer() : new FlatButtonDarkModeRenderer(),
24
FlatStyle
.Flat => _modern ? new ModernFlatButtonRenderer() : new FlatButtonDarkModeRenderer(),
25
FlatStyle
.Popup => _modern ? new ModernButtonDarkModeRenderer() : new PopupButtonDarkModeRenderer(),
26
FlatStyle
.System => new SystemButtonDarkModeRenderer(),
170
=> Control.FlatStyle ==
FlatStyle
.Popup && _modern
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeRendererBase.cs (1)
109
FlatStyle
flatStyle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\IButtonRenderer.cs (1)
46
FlatStyle
flatStyle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernButtonColorMath.cs (4)
83
FlatStyle
.Standard or
FlatStyle
.Popup => new ModernButtonDarkModeRenderer(),
84
FlatStyle
.Flat => new ModernFlatButtonRenderer(),
85
FlatStyle
.System => new SystemButtonDarkModeRenderer(),
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernFlatButtonRenderer.cs (1)
11
/// Renders a modern <see cref="
FlatStyle
.Flat"/> button with a rectangular body and a single border.
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\PopupButtonDarkModeRenderer.cs (1)
12
/// Renders a Classic <see cref="
FlatStyle
.Popup"/> button in dark mode.
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonModernAdapter.cs (4)
13
private readonly
FlatStyle
_flatStyle;
15
internal RadioButtonModernAdapter(RadioButton control,
FlatStyle
flatStyle) : base(control)
56
FlatStyle
.Flat => DarkModeAdapterFactory.CreateFlatAdapter(Control),
57
FlatStyle
.Popup => DarkModeAdapterFactory.CreatePopupAdapter(Control),
System\Windows\Forms\Controls\Buttons\CheckBox.Appearance.Docs.cs (1)
18
/// that property is <see cref="
FlatStyle
.System"/>. A check box with <see cref="ThreeState"/> enabled retains
System\Windows\Forms\Controls\Buttons\CheckBox.cs (12)
112
|| FlatStyle !=
FlatStyle
.Standard)
346
if (Appearance == Appearance.Button && FlatStyle ==
FlatStyle
.Popup)
355
&& FlatStyle is
FlatStyle
.Standard or
FlatStyle
.Flat)
357
ButtonBaseAdapter modernAdapter = FlatStyle ==
FlatStyle
.Flat
368
if (FlatStyle !=
FlatStyle
.System)
392
else if (FlatStyle ==
FlatStyle
.Standard)
526
if (FlatStyle ==
FlatStyle
.System)
543
if (FlatStyle ==
FlatStyle
.System)
685
? new CheckBoxModernAdapter(this,
FlatStyle
.Flat)
690
? new CheckBoxModernAdapter(this,
FlatStyle
.Popup)
695
? new CheckBoxModernAdapter(this,
FlatStyle
.Standard)
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (2)
120
&& _owner.FlatStyle !=
FlatStyle
.Popup
147
&& _owner.FlatStyle !=
FlatStyle
.Popup
System\Windows\Forms\Controls\Buttons\RadioButton.cs (8)
202
|| FlatStyle !=
FlatStyle
.Standard)
291
if (Appearance == Appearance.Button && FlatStyle ==
FlatStyle
.Popup)
297
if (FlatStyle !=
FlatStyle
.System)
322
else if (FlatStyle ==
FlatStyle
.Standard)
335
Appearance == Appearance.Button || FlatStyle ==
FlatStyle
.System
541
? new RadioButtonModernAdapter(this,
FlatStyle
.Flat)
546
? new RadioButtonModernAdapter(this,
FlatStyle
.Popup)
551
? new RadioButtonModernAdapter(this,
FlatStyle
.Standard)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (10)
52
private
FlatStyle
_flatStyle =
FlatStyle
.Standard;
519
public partial
FlatStyle
FlatStyle
781
&& FlatStyle ==
FlatStyle
.Popup))
1608
if (FlatStyle ==
FlatStyle
.Popup)
1652
if (FlatStyle ==
FlatStyle
.Popup)
2769
&& FlatStyle is
FlatStyle
.Standard
2770
or
FlatStyle
.Popup))
3813
&& (FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup))
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
112
if ((!comboBox.Enabled) || (comboBox.FlatStyle ==
FlatStyle
.Popup))
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatStyle.Docs.cs (6)
15
/// In an effective .NET 11-or-later mode, <see cref="
FlatStyle
.Standard"/> uses a rounded field matching
16
/// the TextBoxBase color scheme, <see cref="
FlatStyle
.Flat"/> uses the same colors with a square border,
17
/// and <see cref="
FlatStyle
.Popup"/> uses Standard geometry with a Windows-accent border. Each style adds
19
/// <see cref="
FlatStyle
.System"/> style is not modernized.
30
[DefaultValue(
FlatStyle
.Standard)]
33
public partial
FlatStyle
FlatStyle { get; set; }
System\Windows\Forms\Controls\ComboBox\ComboBox.Modern.cs (6)
20
&& FlatStyle !=
FlatStyle
.System;
24
|| FlatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup;
657
bool recreateSystemHandle = FlatStyle ==
FlatStyle
.System
751
/// transitions only repaint. <see cref="
FlatStyle
.System"/> remains native.
758
if (FlatStyle ==
FlatStyle
.System)
System\Windows\Forms\Controls\ComboBox\ComboBox.ModernComboAdapter.cs (5)
19
private readonly
FlatStyle
_flatStyle;
76
if (_flatStyle !=
FlatStyle
.Flat)
98
case
FlatStyle
.Standard:
105
case
FlatStyle
.Flat:
111
case
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);
533
(DataGridView.ApplyVisualStylesToInnerCells || FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup))
558
if (DataGridView.ApplyVisualStylesToInnerCells || FlatStyle ==
FlatStyle
.Flat || FlatStyle ==
FlatStyle
.Popup)
714
case
FlatStyle
.Standard:
715
case
FlatStyle
.System:
759
case
FlatStyle
.Flat:
795
Debug.Assert(FlatStyle ==
FlatStyle
.Popup, "FlatStyle.Popup is the last flat style");
885
if (FlatStyle is
FlatStyle
.System or
FlatStyle
.Standard)
889
else if (FlatStyle ==
FlatStyle
.Flat)
925
Debug.Assert(FlatStyle ==
FlatStyle
.Popup, "FlatStyle.Popup is the last flat style");
964
FlatStyle !=
FlatStyle
.Flat && FlatStyle !=
FlatStyle
.Popup)
975
(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)
1174
case
FlatStyle
.Standard:
1175
case
FlatStyle
.System:
1177
case
FlatStyle
.Flat:
1181
case
FlatStyle
.Popup:
1191
case
FlatStyle
.Flat:
1196
case
FlatStyle
.Popup:
1239
if (DataGridView.ApplyVisualStylesToInnerCells && FlatStyle !=
FlatStyle
.Flat && FlatStyle !=
FlatStyle
.Popup)
1253
if (FlatStyle is
FlatStyle
.System or
FlatStyle
.Standard)
1281
else if (FlatStyle ==
FlatStyle
.Flat)
1387
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;
1206
if (FlatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup)
1692
if (DisplayStyle == DataGridViewComboBoxDisplayStyle.ComboBox && FlatStyle ==
FlatStyle
.Popup)
1712
(FlatStyle ==
FlatStyle
.Standard || FlatStyle ==
FlatStyle
.System) &&
1719
if (DisplayStyle == DataGridViewComboBoxDisplayStyle.ComboBox && FlatStyle ==
FlatStyle
.Popup)
1734
if ((FlatStyle ==
FlatStyle
.Standard || FlatStyle ==
FlatStyle
.System) && DataGridView.ApplyVisualStylesToInnerCells)
1888
bool paintFlat = FlatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup;
1889
bool paintPopup = FlatStyle ==
FlatStyle
.Popup &&
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxColumn.cs (2)
305
[DefaultValue(
FlatStyle
.Standard)]
309
public
FlatStyle
FlatStyle
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (5)
23
private
FlatStyle
_flatStyle =
FlatStyle
.Standard;
176
public partial
FlatStyle
FlatStyle
194
if (value !=
FlatStyle
.System)
237
private bool OwnerDraw => FlatStyle !=
FlatStyle
.System;
System\Windows\Forms\Controls\GroupBox\GroupBox.FlatStyle.Docs.cs (6)
15
/// In an effective .NET 11-or-later mode, <see cref="
FlatStyle
.Standard"/> renders a borderless rectangular
16
/// surface with an enlarged caption, <see cref="
FlatStyle
.Flat"/> renders a rounded accent outline with an
17
/// ambient-size inline caption, and <see cref="
FlatStyle
.Popup"/> renders a Windows-accent header band.
18
/// <see cref="
FlatStyle
.System"/> remains a native <c>BS_GROUPBOX</c> in every mode.
30
[DefaultValue(
FlatStyle
.Standard)]
32
public partial
FlatStyle
FlatStyle { get; set; }
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (10)
22
private
FlatStyle
_modernCaptionFlatStyle;
79
case
FlatStyle
.Standard:
92
case
FlatStyle
.Flat:
109
case
FlatStyle
.Popup:
183
if (FlatStyle !=
FlatStyle
.Standard)
190
case
FlatStyle
.Standard:
193
case
FlatStyle
.Flat:
196
case
FlatStyle
.Popup:
528
float styleScale = FlatStyle ==
FlatStyle
.Flat
784
if (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);
79
_labelState[s_stateFlatStyle] = (int)
FlatStyle
.Standard;
319
[DefaultValue(
FlatStyle
.Standard)]
321
public
FlatStyle
FlatStyle
323
get => (
FlatStyle
)_labelState[s_stateFlatStyle];
334
bool needRecreate = (_labelState[s_stateFlatStyle] == (int)
FlatStyle
.System) || (value ==
FlatStyle
.System);
1045
internal virtual bool UseGDIMeasuring() => (FlatStyle ==
FlatStyle
.System || !UseCompatibleTextRendering);
1072
TextFormatFlags format = FlatStyle ==
FlatStyle
.System ? TextFormatFlags.Default : CreateTextFormatFlags(proposedConstraints);
1104
if (UseCompatibleTextRendering && FlatStyle !=
FlatStyle
.System)
1144
private bool IsOwnerDraw() => FlatStyle !=
FlatStyle
.System;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
153
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\Rendering\Button\AnimatedPopupButtonRenderer.cs (1)
13
/// <see cref="
FlatStyle
.Popup"/> when modern visual styles or dark mode are active, using the concave key-cap
System\Windows\Forms\Rendering\Button\PopupButtonAnimationState.cs (1)
7
/// Immutable snapshot of the animation progress of a <see cref="
FlatStyle
.Popup"/> key-cap button.
System\Windows\Forms\Rendering\Button\PopupButtonColorMath.cs (1)
7
/// Color utilities used by the <see cref="
FlatStyle
.Popup"/> key-cap renderer to derive material shading
System\Windows\Forms\Rendering\Button\PopupButtonEasing.cs (1)
7
/// Easing functions for the <see cref="
FlatStyle
.Popup"/> key-cap state-change animations.
System\Windows\Forms\Rendering\Button\PopupButtonKeyCapRenderer.cs (1)
12
/// and a shallow bowl - used for the <see cref="
FlatStyle
.Popup"/> button visual style for arbitrary colors,
System\Windows\Forms\Rendering\Button\PopupButtonMetric.cs (1)
7
/// A DPI-neutral, generic magnitude used to tune the <see cref="
FlatStyle
.Popup"/> key-cap renderer
System\Windows\Forms\Rendering\Button\PopupButtonRenderContext.cs (1)
9
/// Carries every piece of information the <see cref="
FlatStyle
.Popup"/> key-cap renderer needs, without a
System\Windows\Forms\Rendering\Button\PopupButtonRenderOptions.cs (1)
7
/// Tunable rendering options for the <see cref="
FlatStyle
.Popup"/> key-cap renderer.
System\Windows\Forms\Rendering\Button\PopupButtonTextEffect.cs (1)
7
/// Determines how the caption of a <see cref="
FlatStyle
.Popup"/> key-cap button is physically integrated
System\Windows\Forms\Rendering\CheckBox\AnimatedCheckGlyphRenderer.cs (5)
83
FlatStyle
flatStyle,
144
Control.LogicalToDeviceUnits(flatStyle ==
FlatStyle
.Popup ? 2 : 1));
244
private static GraphicsPath CreateBoxPath(Rectangle bounds,
FlatStyle
flatStyle)
247
if (flatStyle ==
FlatStyle
.Flat)
253
double radiusFactor = flatStyle ==
FlatStyle
.Popup ? 0.3 : 0.2;
System\Windows\Forms\Rendering\RadioButton\AnimatedRadioGlyphRenderer.cs (2)
79
FlatStyle
flatStyle,
143
Control.LogicalToDeviceUnits(flatStyle ==
FlatStyle
.Popup ? 2 : 1));
System.Windows.Forms.Design (24)
System\Windows\Forms\Design\ButtonBaseDesigner.cs (24)
46
FlatStyle
flatStyle =
FlatStyle
.Standard;
103
private static int CheckboxBaselineOffset(ContentAlignment alignment,
FlatStyle
flatStyle)
107
if (flatStyle is
FlatStyle
.Standard or
FlatStyle
.System)
118
if (flatStyle ==
FlatStyle
.Standard)
122
else if (flatStyle ==
FlatStyle
.System)
126
else if (flatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup)
139
if (flatStyle ==
FlatStyle
.Standard)
143
else if (flatStyle ==
FlatStyle
.System)
147
else if (flatStyle is
FlatStyle
.Flat or
FlatStyle
.Popup)
159
private static int RadiobuttonBaselineOffset(ContentAlignment alignment,
FlatStyle
flatStyle)
163
if (flatStyle ==
FlatStyle
.System)
174
if (flatStyle is
FlatStyle
.Standard or
FlatStyle
.Flat or
FlatStyle
.Popup)
178
else if (flatStyle ==
FlatStyle
.System)
190
private static int DefaultBaselineOffset(ContentAlignment alignment,
FlatStyle
flatStyle)
199
if (flatStyle is
FlatStyle
.Standard or
FlatStyle
.Popup)
203
else if (flatStyle ==
FlatStyle
.System)
207
else if (flatStyle ==
FlatStyle
.Flat)