Пример #1
0
 /// <summary>
 /// A <see cref="bool"/> for if the OS / Chromium currently has a dark mode enabled or is
 /// being instructed to show a dark-style UI. If you want to modify this value you
 /// should use <see cref="SetThemeSource"/>.
 /// </summary>
 public Task <bool> ShouldUseDarkColorsAsync() => BridgeConnector.OnResult <bool>("nativeTheme-shouldUseDarkColors", "nativeTheme-shouldUseDarkColors-completed");
Пример #2
0
 /// <summary>
 /// A <see cref="ThemeSourceMode"/> property that can be <see cref="ThemeSourceMode.System"/>, <see cref="ThemeSourceMode.Light"/> or <see cref="ThemeSourceMode.Dark"/>. It is used to override (<seealso cref="SetThemeSource"/>) and
 /// supercede the value that Chromium has chosen to use internally.
 /// </summary>
 public async Task <ThemeSourceMode> GetThemeSourceAsync() => Enum.Parse <ThemeSourceMode>(await BridgeConnector.OnResult <string>("nativeTheme-themeSource-get", "nativeTheme-themeSource-getCompleted"), true);