81 references to IsDarkModeEnabled
System.Windows.Forms (77)
System\Windows\Forms\Application.cs (4)
281
/// has never been called) and <see cref="
IsDarkModeEnabled
"/> is <see langword="true"/>.
291
_ =>
IsDarkModeEnabled
389
bool 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)
121
if (!SystemInformation.HighContrast && Application.
IsDarkModeEnabled
)
System\Windows\Forms\Control.cs (3)
8060
if (Application.
IsDarkModeEnabled
10154
if (Application.
IsDarkModeEnabled
11217
PrepareDarkMode(HWND, Application.
IsDarkModeEnabled
);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxModernAdapter.cs (1)
129
: Application.
IsDarkModeEnabled
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\DarkModeAdapterFactory.cs (1)
12
return Application.
IsDarkModeEnabled
|| control.EffectiveVisualStylesModeInternal >= VisualStylesMode.Net11;
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernButtonDarkModeRenderer.cs (1)
45
private static bool IsDark => Application.
IsDarkModeEnabled
;
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernFlatButtonRenderer.cs (1)
24
private static bool IsDark => Application.
IsDarkModeEnabled
;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonModernAdapter.cs (1)
129
: 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)
264
return Application.
IsDarkModeEnabled
2434
if (Application.
IsDarkModeEnabled
)
3838
if (hwndChild == _childEdit?.HWND && Application.
IsDarkModeEnabled
)
3861
&& !Application.
IsDarkModeEnabled
)
3875
&& Application.
IsDarkModeEnabled
4058
if (Application.
IsDarkModeEnabled
System\Windows\Forms\Controls\ComboBox\ComboBox.ModernComboAdapter.cs (1)
257
=> Application.
IsDarkModeEnabled
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (1)
18
private static readonly VisualStyleElement s_comboBoxElement = Application.
IsDarkModeEnabled
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
15305
if (Application.
IsDarkModeEnabled
&& AppContextSwitches.DataGridViewDarkModeTheming)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
1438
else if (Application.
IsDarkModeEnabled
&& AppContextSwitches.DataGridViewDarkModeTheming)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
1009
if (Application.
IsDarkModeEnabled
&& AppContextSwitches.DataGridViewDarkModeTheming)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.DataGridViewComboBoxCellRenderer.cs (3)
21
private static VisualStyleElement ComboBoxDropDownButtonElement => Application.
IsDarkModeEnabled
63
if (Application.
IsDarkModeEnabled
&& AppContextSwitches.DataGridViewDarkModeTheming)
82
if (Application.
IsDarkModeEnabled
&& AppContextSwitches.DataGridViewDarkModeTheming)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (4)
55
else if (Application.
IsDarkModeEnabled
&& AppContextSwitches.DataGridViewDarkModeTheming)
167
else if (Application.
IsDarkModeEnabled
&& AppContextSwitches.DataGridViewDarkModeTheming)
308
else 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)
457
if (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)
600
foreColor = Application.
IsDarkModeEnabled
? SystemColors.ControlText : SystemColors.HighlightText;
System\Windows\Forms\Controls\ListView\ListView.cs (4)
4671
if (Application.
IsDarkModeEnabled
5002
if (c != SystemColors.Window || Application.
IsDarkModeEnabled
)
5009
if (c != SystemColors.WindowText || Application.
IsDarkModeEnabled
)
6024
if (Application.
IsDarkModeEnabled
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (2)
196
if (ShouldSerializeBackColor() || Application.
IsDarkModeEnabled
)
412
if (ShouldSerializeForeColor() || Application.
IsDarkModeEnabled
)
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
82
if (Application.
IsDarkModeEnabled
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
78
private Color _selectedItemWithFocusForeColor = Application.
IsDarkModeEnabled
? SystemColors.ControlText : SystemColors.HighlightText;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
104
if (Application.
IsDarkModeEnabled
&& RequestDarkModeRendering)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
70
if (!Application.RenderWithVisualStyles || Application.
IsDarkModeEnabled
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
209
RequestDarkModeRendering = Application.
IsDarkModeEnabled
,
259
RequestDarkModeRendering = Application.
IsDarkModeEnabled
,
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
3540
&& Application.
IsDarkModeEnabled
)
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1299
if (!_suspendDarkModeChange && Application.
IsDarkModeEnabled
)
System\Windows\Forms\Controls\TabControl\TabPage.cs (3)
105
else if (!Application.
IsDarkModeEnabled
611
Color bkColor = (UseVisualStyleBackColor && !Application.
IsDarkModeEnabled
)
626
if (Application.
IsDarkModeEnabled
)
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
297
? Application.
IsDarkModeEnabled
1213
if (Application.
IsDarkModeEnabled
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
300
using var brush = Application.
IsDarkModeEnabled
?
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
72
bool isDarkMode = Application.
IsDarkModeEnabled
;
883
else if (Application.
IsDarkModeEnabled
)
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
73
if (Application.
IsDarkModeEnabled
)
System\Windows\Forms\Controls\TreeView\TreeView.cs (3)
1881
if (Application.
IsDarkModeEnabled
&& DarkModeRequestState is true)
1900
if (c != SystemColors.Window || Application.
IsDarkModeEnabled
)
1907
if (c != SystemColors.WindowText || Application.
IsDarkModeEnabled
)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (2)
314
bool isDarkMode = Application.
IsDarkModeEnabled
;
350
else if (Application.
IsDarkModeEnabled
)
System\Windows\Forms\Form.cs (1)
5020
SetFormImmersiveDarkModeInternal(Application.
IsDarkModeEnabled
);
System\Windows\Forms\Rendering\Button\AnimatedPopupButtonRenderer.cs (1)
167
IsDarkMode = Application.
IsDarkModeEnabled
,
System\Windows\Forms\Rendering\CheckBox\AnimatedCheckGlyphRenderer.cs (1)
92
bool isDark = Application.
IsDarkModeEnabled
;
System\Windows\Forms\Rendering\ControlPaint.cs (1)
1883
if (Application.
IsDarkModeEnabled
)
System\Windows\Forms\Rendering\ModernControlColorMath.cs (4)
34
=> Application.
IsDarkModeEnabled
45
: Application.
IsDarkModeEnabled
56
: Application.
IsDarkModeEnabled
66
Application.
IsDarkModeEnabled
System\Windows\Forms\Rendering\RadioButton\AnimatedRadioGlyphRenderer.cs (1)
88
bool isDark = Application.
IsDarkModeEnabled
;
System\Windows\Forms\ToolTip\ToolTip.cs (1)
721
else if (Application.
IsDarkModeEnabled
)
System.Windows.Forms.Design (4)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
598
textColor = Application.
IsDarkModeEnabled
? SystemColors.ControlText : SystemColors.HighlightText;
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (2)
200
if (Application.
IsDarkModeEnabled
)
217
if (Application.
IsDarkModeEnabled
)
System\Windows\Forms\Design\DesignerUtils.cs (1)
835
string theme = Application.
IsDarkModeEnabled
? "DarkMode_Explorer" : "Explorer";