Class SystemSettings
SystemSettings allows the application to ask for details about the system. This can include settings such as standard colours, fonts, and user interface element sizes.
public static class SystemSettings
- Inheritance
-
SystemSettings
Properties
- AppearanceIsDark
Return true if the current system there is explicitly recognized as being a dark theme or if the default window background is dark.
- AppearanceName
Returns the name if available or empty string otherwise.
- Handler
Gets or sets ISystemSettingsHandler provider used to work with system settings.
- IsUsingDarkBackground
Returns true if the background is darker than foreground. This is used by AppearanceIsDark if there is no platform-specific way to determine whether a dark mode is being used and is generally not very useful to call directly.
Methods
- GetColor(KnownSystemColor)
Gets a standard system color.
- GetFont(SystemSettingsFont)
Gets system font.
- GetMetric(SystemSettingsMetric)
Returns the value of a system metric, or -1 if the metric is not supported on the current system.
- GetMetric(SystemSettingsMetric, Control?)
Returns the value of a system metric, or -1 if the metric is not supported on the current system.
- HasFeature(SystemSettingsFeature)
Returns
true
if the port has certain feature.
- IsDarkBackground(Color, Color)
Returns true if
backgroundColor
is darker thanforegroundColor
.
- LogFixedWidthFonts()
Logs all fonts with fixed widths (IsFixedWidth property is true).
- LogSystemFonts()
Logs all fonts enumerated in SystemSettingsFont.
- ResetColors()
Resets internal structures related to the system colors.