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 theme is explicitly recognized as being a dark theme or if the default window background is dark.
- AppearanceIsDarkOverride
Gets or sets an override for AppearanceIsDark.
- AppearanceName
Returns the name if available or empty string otherwise.
- Handler
Gets or sets ISystemSettingsHandler provider used to work with system settings.
- HasHandler
Gets whether SystemSettings is initialized and can be used. Normally this returns False when Handler is not yet assigned.
- 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.
- IsUsingDarkBackgroundOverride
Gets or sets an override for IsUsingDarkBackground.
Methods
- DoInsideTempAppearanceIsDark(bool?, Action?)
Calls the specified action inside the block which temporary changes value of the AppearanceIsDarkOverride property.
- GetColor(KnownSystemColor)
Gets a standard system color.
- GetDefaultFontSizeIncrement()
Gets default font size increnent depending on the dpi value of the screen. Uses IncFontSize and IncFontSizeHighDpi properties.
- 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, AbstractControl?)
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.
- InitDefaultFontSizeIncrement(int?)
Initializes IncFontSizeHighDpi and IncFontSize with the default values.
- 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. and raises SystemColorsChanged event.
Events
- SystemColorsChanged
Occurs when the system colors change.