265 references to FlatStyle
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.cs (3)
522button.FlatStyle = FlatStyle.Flat; 801button?.FlatStyle = FlatStyle.Standard; 814button?.FlatStyle = FlatStyle.Flat;
System.Windows.Forms (238)
_generated\1\Validation.cs (2)
72public static void Validate(System.Windows.Forms.FlatStyle enumToValidate, string parameterName = "value") 76ReportEnumValidationError(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 86if (FlatStyle != FlatStyle.System)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (11)
21private FlatStyle _flatStyle = FlatStyle.Standard; 49private FlatStyle _cachedAdapterType; 343public partial FlatStyle FlatStyle 617if (FlatStyle == FlatStyle.Standard) 636FlatStyle != FlatStyle.System; 993case FlatStyle.Standard: 996case FlatStyle.Popup: 999case 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)] 33public partial FlatStyle FlatStyle { get; set; }
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
707if (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\ButtonInternal\CheckBoxModernAdapter.cs (4)
13private readonly FlatStyle _flatStyle; 15internal CheckBoxModernAdapter(CheckBox control, FlatStyle flatStyle) : base(control) 56FlatStyle.Flat => DarkModeAdapterFactory.CreateFlatAdapter(Control), 57FlatStyle.Popup => DarkModeAdapterFactory.CreatePopupAdapter(Control),
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeAdapter.cs (5)
23FlatStyle.Standard => _modern ? new ModernButtonDarkModeRenderer() : new FlatButtonDarkModeRenderer(), 24FlatStyle.Flat => _modern ? new ModernFlatButtonRenderer() : new FlatButtonDarkModeRenderer(), 25FlatStyle.Popup => _modern ? new ModernButtonDarkModeRenderer() : new PopupButtonDarkModeRenderer(), 26FlatStyle.System => new SystemButtonDarkModeRenderer(), 170=> Control.FlatStyle == FlatStyle.Popup && _modern
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeRendererBase.cs (1)
109FlatStyle flatStyle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\IButtonRenderer.cs (1)
46FlatStyle flatStyle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernButtonColorMath.cs (4)
83FlatStyle.Standard or FlatStyle.Popup => new ModernButtonDarkModeRenderer(), 84FlatStyle.Flat => new ModernFlatButtonRenderer(), 85FlatStyle.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)
13private readonly FlatStyle _flatStyle; 15internal RadioButtonModernAdapter(RadioButton control, FlatStyle flatStyle) : base(control) 56FlatStyle.Flat => DarkModeAdapterFactory.CreateFlatAdapter(Control), 57FlatStyle.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) 346if (Appearance == Appearance.Button && FlatStyle == FlatStyle.Popup) 355&& FlatStyle is FlatStyle.Standard or FlatStyle.Flat) 357ButtonBaseAdapter modernAdapter = FlatStyle == FlatStyle.Flat 368if (FlatStyle != FlatStyle.System) 392else if (FlatStyle == FlatStyle.Standard) 526if (FlatStyle == FlatStyle.System) 543if (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) 291if (Appearance == Appearance.Button && FlatStyle == FlatStyle.Popup) 297if (FlatStyle != FlatStyle.System) 322else if (FlatStyle == FlatStyle.Standard) 335Appearance == 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)
52private FlatStyle _flatStyle = FlatStyle.Standard; 519public partial FlatStyle FlatStyle 781&& FlatStyle == FlatStyle.Popup)) 1608if (FlatStyle == FlatStyle.Popup) 1652if (FlatStyle == FlatStyle.Popup) 2769&& FlatStyle is FlatStyle.Standard 2770or FlatStyle.Popup)) 3813&& (FlatStyle == FlatStyle.Flat || FlatStyle == FlatStyle.Popup))
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
112if ((!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)] 33public 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; 657bool recreateSystemHandle = FlatStyle == FlatStyle.System 751/// transitions only repaint. <see cref="FlatStyle.System"/> remains native. 758if (FlatStyle == FlatStyle.System)
System\Windows\Forms\Controls\ComboBox\ComboBox.ModernComboAdapter.cs (5)
19private readonly FlatStyle _flatStyle; 76if (_flatStyle != FlatStyle.Flat) 98case FlatStyle.Standard: 105case FlatStyle.Flat: 111case 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); 533(DataGridView.ApplyVisualStylesToInnerCells || FlatStyle == FlatStyle.Flat || FlatStyle == FlatStyle.Popup)) 558if (DataGridView.ApplyVisualStylesToInnerCells || FlatStyle == FlatStyle.Flat || FlatStyle == FlatStyle.Popup) 714case FlatStyle.Standard: 715case FlatStyle.System: 759case FlatStyle.Flat: 795Debug.Assert(FlatStyle == FlatStyle.Popup, "FlatStyle.Popup is the last flat style"); 885if (FlatStyle is FlatStyle.System or FlatStyle.Standard) 889else if (FlatStyle == FlatStyle.Flat) 925Debug.Assert(FlatStyle == FlatStyle.Popup, "FlatStyle.Popup is the last flat style"); 964FlatStyle != FlatStyle.Flat && FlatStyle != FlatStyle.Popup) 975(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) 1174case FlatStyle.Standard: 1175case FlatStyle.System: 1177case FlatStyle.Flat: 1181case FlatStyle.Popup: 1191case FlatStyle.Flat: 1196case FlatStyle.Popup: 1239if (DataGridView.ApplyVisualStylesToInnerCells && FlatStyle != FlatStyle.Flat && FlatStyle != FlatStyle.Popup) 1253if (FlatStyle is FlatStyle.System or FlatStyle.Standard) 1281else if (FlatStyle == FlatStyle.Flat) 1387Debug.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; 1206if (FlatStyle is FlatStyle.Flat or FlatStyle.Popup) 1692if (DisplayStyle == DataGridViewComboBoxDisplayStyle.ComboBox && FlatStyle == FlatStyle.Popup) 1712(FlatStyle == FlatStyle.Standard || FlatStyle == FlatStyle.System) && 1719if (DisplayStyle == DataGridViewComboBoxDisplayStyle.ComboBox && FlatStyle == FlatStyle.Popup) 1734if ((FlatStyle == FlatStyle.Standard || FlatStyle == FlatStyle.System) && DataGridView.ApplyVisualStylesToInnerCells) 1888bool paintFlat = FlatStyle is FlatStyle.Flat or FlatStyle.Popup; 1889bool paintPopup = FlatStyle == FlatStyle.Popup &&
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxColumn.cs (2)
305[DefaultValue(FlatStyle.Standard)] 309public FlatStyle FlatStyle
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (5)
23private FlatStyle _flatStyle = FlatStyle.Standard; 176public partial FlatStyle FlatStyle 194if (value != FlatStyle.System) 237private 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)] 32public partial FlatStyle FlatStyle { get; set; }
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (10)
22private FlatStyle _modernCaptionFlatStyle; 79case FlatStyle.Standard: 92case FlatStyle.Flat: 109case FlatStyle.Popup: 183if (FlatStyle != FlatStyle.Standard) 190case FlatStyle.Standard: 193case FlatStyle.Flat: 196case FlatStyle.Popup: 528float styleScale = FlatStyle == FlatStyle.Flat 784if (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); 79_labelState[s_stateFlatStyle] = (int)FlatStyle.Standard; 319[DefaultValue(FlatStyle.Standard)] 321public FlatStyle FlatStyle 323get => (FlatStyle)_labelState[s_stateFlatStyle]; 334bool needRecreate = (_labelState[s_stateFlatStyle] == (int)FlatStyle.System) || (value == FlatStyle.System); 1045internal virtual bool UseGDIMeasuring() => (FlatStyle == FlatStyle.System || !UseCompatibleTextRendering); 1072TextFormatFlags format = FlatStyle == FlatStyle.System ? TextFormatFlags.Default : CreateTextFormatFlags(proposedConstraints); 1104if (UseCompatibleTextRendering && FlatStyle != FlatStyle.System) 1144private bool IsOwnerDraw() => FlatStyle != FlatStyle.System;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
153public 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\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)
83FlatStyle flatStyle, 144Control.LogicalToDeviceUnits(flatStyle == FlatStyle.Popup ? 2 : 1)); 244private static GraphicsPath CreateBoxPath(Rectangle bounds, FlatStyle flatStyle) 247if (flatStyle == FlatStyle.Flat) 253double radiusFactor = flatStyle == FlatStyle.Popup ? 0.3 : 0.2;
System\Windows\Forms\Rendering\RadioButton\AnimatedRadioGlyphRenderer.cs (2)
79FlatStyle flatStyle, 143Control.LogicalToDeviceUnits(flatStyle == FlatStyle.Popup ? 2 : 1));
System.Windows.Forms.Design (24)
System\Windows\Forms\Design\ButtonBaseDesigner.cs (24)
46FlatStyle flatStyle = FlatStyle.Standard; 103private static int CheckboxBaselineOffset(ContentAlignment alignment, FlatStyle flatStyle) 107if (flatStyle is FlatStyle.Standard or FlatStyle.System) 118if (flatStyle == FlatStyle.Standard) 122else if (flatStyle == FlatStyle.System) 126else if (flatStyle is FlatStyle.Flat or FlatStyle.Popup) 139if (flatStyle == FlatStyle.Standard) 143else if (flatStyle == FlatStyle.System) 147else if (flatStyle is FlatStyle.Flat or FlatStyle.Popup) 159private static int RadiobuttonBaselineOffset(ContentAlignment alignment, FlatStyle flatStyle) 163if (flatStyle == FlatStyle.System) 174if (flatStyle is FlatStyle.Standard or FlatStyle.Flat or FlatStyle.Popup) 178else if (flatStyle == FlatStyle.System) 190private static int DefaultBaselineOffset(ContentAlignment alignment, FlatStyle flatStyle) 199if (flatStyle is FlatStyle.Standard or FlatStyle.Popup) 203else if (flatStyle == FlatStyle.System) 207else if (flatStyle == FlatStyle.Flat)