41 references to SystemColorMode
Microsoft.VisualBasic.Forms (7)
Microsoft\VisualBasic\ApplicationServices\ApplyApplicationDefaultsEventArgs.vb (2)
24colorMode As SystemColorMode) 38Public Property ColorMode As SystemColorMode
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (5)
72Private _colorMode As SystemColorMode = SystemColorMode.Classic 197''' The <see cref="SystemColorMode"/> that the application is running in. 201Protected Property ColorMode As SystemColorMode 205Set(value As SystemColorMode)
Microsoft.VisualBasic.Forms.Tests (3)
System\Windows\Forms\WindowsFormsApplicationBaseTests.vb (3)
21ColorMode.Should.Be(SystemColorMode.Classic) 22ColorMode = SystemColorMode.Dark 23ColorMode.Should.Be(SystemColorMode.Dark)
System.Windows.Forms (22)
System\Windows\Forms\Application.cs (22)
48private static SystemColorMode? s_colorMode; 247/// This is the <see cref="SystemColorMode"/> which either has been set by <see cref="SetColorMode(SystemColorMode)"/> 248/// or its default value <see cref="SystemColorMode.Classic"/>. If it has been set to <see cref="SystemColorMode.System"/>, 254public static SystemColorMode ColorMode => s_colorMode ?? SystemColorMode.Classic; 269/// dark mode (<see cref="SystemColorMode.Dark"/>), light mode (<see cref="SystemColorMode.Classic"/>) 270/// or to the system setting (<see cref="SystemColorMode.System"/>). 273/// If you set it to <see cref="SystemColorMode.System"/>, the actual color mode is determined by the 287public static void SetColorMode(SystemColorMode systemColorMode) 294SystemColorMode.Classic => systemColorMode, 295SystemColorMode.System => systemColorMode, 296SystemColorMode.Dark => systemColorMode, 355/// It returns <see cref="SystemColorMode.Dark"/> if the dark mode is enabled in the system settings, 356/// <see cref="SystemColorMode.Classic"/> if the color mode equals the light, standard color setting. 366public static SystemColorMode SystemColorMode => 368? SystemColorMode.Dark 369: SystemColorMode.Classic; 406&& (ColorMode == SystemColorMode.Dark 407|| (ColorMode == SystemColorMode.System && SystemColorMode == SystemColorMode.Dark));
System.Windows.Forms.Tests (9)
System\Windows\Forms\ApplicationTests.cs (9)
161SystemColorMode systemColorMode = Application.SystemColorMode; 163Application.SetColorMode(SystemColorMode.Classic); 165Assert.Equal(SystemColorMode.Classic, Application.ColorMode); 168Application.SetColorMode(SystemColorMode.Dark); 170Assert.Equal(SystemColorMode.Dark, Application.ColorMode); 173Application.SetColorMode(SystemColorMode.System); 174Assert.False(Application.IsDarkModeEnabled ^ systemColorMode == SystemColorMode.Dark); 175Assert.Equal(SystemColorMode.System, Application.ColorMode); 176Assert.False(SystemColors.UseAlternativeColorSet ^ systemColorMode == SystemColorMode.Dark);