85 references to IsDarkModeEnabled
System.Windows.Forms (81)
System\Windows\Forms\Application.cs (4)
281/// has never been called) and <see cref="IsDarkModeEnabled"/> is <see langword="true"/>. 291_ => IsDarkModeEnabled 389bool darkModeEnabled = IsDarkModeEnabled; 442/// and <see cref="IsDarkModeEnabled"/>, which can themselves change for the lifetime of the process;
System\Windows\Forms\Components\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
121if (!SystemInformation.HighContrast && Application.IsDarkModeEnabled)
System\Windows\Forms\Control.cs (3)
8060if (Application.IsDarkModeEnabled 10154if (Application.IsDarkModeEnabled 11217PrepareDarkMode(HWND, Application.IsDarkModeEnabled);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxModernAdapter.cs (1)
108: Application.IsDarkModeEnabled
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\DarkModeAdapterFactory.cs (1)
12return Application.IsDarkModeEnabled || control.EffectiveVisualStylesModeInternal >= VisualStylesMode.Net11;
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernButtonDarkModeRenderer.cs (1)
45private static bool IsDark => Application.IsDarkModeEnabled;
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernFlatButtonRenderer.cs (1)
24private static bool IsDark => Application.IsDarkModeEnabled;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonModernAdapter.cs (1)
108: Application.IsDarkModeEnabled
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
110((!Application.IsDarkModeEnabled
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
221|| ((!Application.IsDarkModeEnabled
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (6)
264return Application.IsDarkModeEnabled 2434if (Application.IsDarkModeEnabled) 3845if (hwndChild == _childEdit?.HWND && Application.IsDarkModeEnabled) 3868&& !Application.IsDarkModeEnabled) 3882&& Application.IsDarkModeEnabled 4065if (Application.IsDarkModeEnabled
System\Windows\Forms\Controls\ComboBox\ComboBox.ModernComboAdapter.cs (2)
257=> Application.IsDarkModeEnabled 471Application.IsDarkModeEnabled);
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (1)
18private static readonly VisualStyleElement s_comboBoxElement = Application.IsDarkModeEnabled
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
15305if (Application.IsDarkModeEnabled && AppContextSwitches.DataGridViewDarkModeTheming)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
1438else if (Application.IsDarkModeEnabled && AppContextSwitches.DataGridViewDarkModeTheming)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
1009if (Application.IsDarkModeEnabled && AppContextSwitches.DataGridViewDarkModeTheming)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.DataGridViewComboBoxCellRenderer.cs (3)
21private static VisualStyleElement ComboBoxDropDownButtonElement => Application.IsDarkModeEnabled 63if (Application.IsDarkModeEnabled && AppContextSwitches.DataGridViewDarkModeTheming) 82if (Application.IsDarkModeEnabled && AppContextSwitches.DataGridViewDarkModeTheming)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (4)
55else if (Application.IsDarkModeEnabled && AppContextSwitches.DataGridViewDarkModeTheming) 167else if (Application.IsDarkModeEnabled && AppContextSwitches.DataGridViewDarkModeTheming) 308else if (Application.IsDarkModeEnabled && AppContextSwitches.DataGridViewDarkModeTheming) 1051&& Application.IsDarkModeEnabled
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
492|| Application.IsDarkModeEnabled
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
457if (ShouldSerializeForeColor() || Application.IsDarkModeEnabled || !Enabled)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (3)
74: Application.IsDarkModeEnabled 245: Application.IsDarkModeEnabled 360: Application.IsDarkModeEnabled
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
600foreColor = Application.IsDarkModeEnabled ? SystemColors.ControlText : SystemColors.HighlightText;
System\Windows\Forms\Controls\ListView\ListView.cs (4)
4671if (Application.IsDarkModeEnabled 5002if (c != SystemColors.Window || Application.IsDarkModeEnabled) 5009if (c != SystemColors.WindowText || Application.IsDarkModeEnabled) 6024if (Application.IsDarkModeEnabled
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (2)
196if (ShouldSerializeBackColor() || Application.IsDarkModeEnabled) 412if (ShouldSerializeForeColor() || Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
82if (Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
78private Color _selectedItemWithFocusForeColor = Application.IsDarkModeEnabled ? SystemColors.ControlText : SystemColors.HighlightText;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
104if (Application.IsDarkModeEnabled && RequestDarkModeRendering)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
70if (!Application.RenderWithVisualStyles || Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
209RequestDarkModeRendering = Application.IsDarkModeEnabled, 259RequestDarkModeRendering = Application.IsDarkModeEnabled,
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
3540&& Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1299if (!_suspendDarkModeChange && Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\TabControl\TabPage.cs (3)
105else if (!Application.IsDarkModeEnabled 611Color bkColor = (UseVisualStyleBackColor && !Application.IsDarkModeEnabled) 626if (Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (3)
299? Application.IsDarkModeEnabled 1215if (Application.IsDarkModeEnabled 2805DarkMode: Application.IsDarkModeEnabled,
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
300using var brush = Application.IsDarkModeEnabled ?
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
72bool isDarkMode = Application.IsDarkModeEnabled; 883else if (Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
73if (Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\TreeView\TreeView.cs (3)
1881if (Application.IsDarkModeEnabled && DarkModeRequestState is true) 1900if (c != SystemColors.Window || Application.IsDarkModeEnabled) 1907if (c != SystemColors.WindowText || Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
1104? ModernControlColorMath.GetFieldStrokeStrong(clientBackColor, Application.IsDarkModeEnabled)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (2)
314bool isDarkMode = Application.IsDarkModeEnabled; 350else if (Application.IsDarkModeEnabled)
System\Windows\Forms\Form.cs (1)
5020SetFormImmersiveDarkModeInternal(Application.IsDarkModeEnabled);
System\Windows\Forms\Rendering\Button\AnimatedPopupButtonRenderer.cs (1)
167IsDarkMode = Application.IsDarkModeEnabled,
System\Windows\Forms\Rendering\CheckBox\AnimatedCheckGlyphRenderer.cs (1)
92bool isDark = Application.IsDarkModeEnabled;
System\Windows\Forms\Rendering\ControlPaint.cs (1)
1883if (Application.IsDarkModeEnabled)
System\Windows\Forms\Rendering\ModernControlColorMath.cs (5)
53=> Application.IsDarkModeEnabled 64: Application.IsDarkModeEnabled 75: Application.IsDarkModeEnabled 83: Application.IsDarkModeEnabled 93Application.IsDarkModeEnabled
System\Windows\Forms\Rendering\RadioButton\AnimatedRadioGlyphRenderer.cs (1)
88bool isDark = Application.IsDarkModeEnabled;
System\Windows\Forms\ToolTip\ToolTip.cs (1)
721else if (Application.IsDarkModeEnabled)
System.Windows.Forms.Design (4)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
598textColor = Application.IsDarkModeEnabled ? SystemColors.ControlText : SystemColors.HighlightText;
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (2)
200if (Application.IsDarkModeEnabled) 217if (Application.IsDarkModeEnabled)
System\Windows\Forms\Design\DesignerUtils.cs (1)
835string theme = Application.IsDarkModeEnabled ? "DarkMode_Explorer" : "Explorer";