5 instantiations of ThemeMode
PresentationFramework (5)
System\Windows\ThemeMode.cs (4)
30public static ThemeMode None => new ThemeMode(); 39public static ThemeMode Light => new ThemeMode("Light"); 48public static ThemeMode Dark => new ThemeMode("Dark"); 57public static ThemeMode System => new ThemeMode("System");
System\Windows\ThemeModeConverter.cs (1)
69return new ThemeMode(source.ToString());
77 references to ThemeMode
PresentationFramework (77)
System\Windows\Appearance\WindowBackdropManager.cs (1)
35if(!ThemeManager.IsFluentThemeEnabled && window.ThemeMode == ThemeMode.None)
System\Windows\Application.cs (10)
924if(value != null && ThemeMode != ThemeMode.None) 966/// <see cref="ThemeMode.None"/> - No Fluent theme is loaded. 967/// <see cref="ThemeMode.System"/> - Fluent theme is loaded based on the system theme. 968/// <see cref="ThemeMode.Light"/> - Fluent theme is loaded in Light mode. 969/// <see cref="ThemeMode.Dark"/> - Fluent theme is loaded in Dark mode. 973/// The default value is <see cref="ThemeMode.None"/>. 987public ThemeMode ThemeMode 1001ThemeMode oldValue = _themeMode; 2512private ThemeMode _themeMode = ThemeMode.None;
System\Windows\ThemeManager.cs (35)
31if (window.ThemeMode == ThemeMode.None) 56if (window.ThemeMode == ThemeMode.None) 68internal static void OnApplicationThemeChanged(ThemeMode oldThemeMode, ThemeMode newThemeMode) 74if (newThemeMode == ThemeMode.None) 104internal static void OnWindowThemeChanged(Window window, ThemeMode oldThemeMode, ThemeMode newThemeMode) 106if (newThemeMode == ThemeMode.None) 120ThemeMode themeMode = GetThemeModeFromResourceDictionary(Application.Current.Resources); 125return themeMode == ThemeMode.None ? false : true; 133ThemeMode themeMode = GetThemeModeFromResourceDictionary(window.Resources); 143if (!IsFluentThemeEnabled && window.ThemeMode == ThemeMode.None) 148if (window.ThemeMode != ThemeMode.None) 160internal static bool IsValidThemeMode(ThemeMode themeMode) 162return themeMode == ThemeMode.None 163|| themeMode == ThemeMode.Light 164|| themeMode == ThemeMode.Dark 165|| themeMode == ThemeMode.System; 168internal static ResourceDictionary GetThemeDictionary(ThemeMode themeMode) 170if (themeMode == ThemeMode.None) 181if (themeMode == ThemeMode.System) 265if (IsFluentThemeEnabled || window.ThemeMode != ThemeMode.None) 314return Application.Current.ThemeMode != ThemeMode.None; 331private static bool GetUseLightColors(ThemeMode themeMode) 334if (themeMode == ThemeMode.None) 340return themeMode == ThemeMode.Light || (themeMode == ThemeMode.System && IsSystemThemeLight()); 343private static ThemeMode GetThemeModeFromResourceDictionary(ResourceDictionary rd) 345ThemeMode themeMode = ThemeMode.None; 360private static ThemeMode GetThemeModeFromSourceUri(Uri source) 363return ThemeMode.None; 368return ThemeMode.Light; 372return ThemeMode.Dark; 376return ThemeMode.System;
System\Windows\ThemeMode.cs (11)
18public readonly struct ThemeMode : IEquatable<ThemeMode> 30public static ThemeMode None => new ThemeMode(); 39public static ThemeMode Light => new ThemeMode("Light"); 48public static ThemeMode Dark => new ThemeMode("Dark"); 57public static ThemeMode System => new ThemeMode("System"); 77public bool Equals(ThemeMode other) => string.Equals(Value, other.Value, StringComparison.Ordinal); 86public override bool Equals(object obj) => obj is ThemeMode other && Equals(other); 102public static bool operator ==(ThemeMode left, ThemeMode right) => left.Equals(right); 112public static bool operator !=(ThemeMode left, ThemeMode right) => !left.Equals(right);
System\Windows\ThemeModeConverter.cs (8)
52/// Attempts to convert to a <see cref="ThemeMode"/> from the specified object 59/// <param name="source">The object to convert to a <see cref="ThemeMode"/>.</param> 61/// The new <see cref="ThemeMode"/> instance. 76/// Attempts to convert a <see cref="ThemeMode"/> object to the specified type. 82/// <paramref name="value" /> is <see langword="null" /> or not a <see cref="ThemeMode"/>, or <paramref name="destinationType" /> isn't a valid destination type. 86/// <param name="value">The <see cref="ThemeMode"/> to convert.</param> 98if (value is ThemeMode themeMode) 106ConstructorInfo ci = typeof(ThemeMode).GetConstructor(new Type[] { typeof(string) });
System\Windows\Window.cs (12)
559/// <see cref="ThemeMode.None"/> - No Fluent theme is loaded. However, if <see cref="Application.ThemeMode"/> is not None, 561/// <see cref="ThemeMode.System"/> - Fluent theme is loaded based on the system theme. 562/// <see cref="ThemeMode.Light"/> - Fluent theme is loaded in Light mode. 563/// <see cref="ThemeMode.Dark"/> - Fluent theme is loaded in Dark mode. 567/// The default value is <see cref="ThemeMode.None"/>. 582public ThemeMode ThemeMode 598ThemeMode oldTheme = _themeMode; 2152if(value != null && ThemeMode != ThemeMode.None) 2396if(ThemeMode != ThemeMode.None) 2608ThemeManager.OnWindowThemeChanged(this, ThemeMode.None, ThemeMode); 7306private ThemeMode _themeMode = ThemeMode.None;