Class SystemSettings
SystemSettings allows the application to ask for details about the system. This can include settings such as standard colors, fonts, and user interface element sizes.
public static class SystemSettings
- Inheritance
-
SystemSettings
Fields
- MouseHoverSize
Represents the size of the area around the mouse cursor, in device independent units, that triggers a mouse hover event. Default value is 4 dips.
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.
- ColorsVersion
Gets the version number of the color configuration.
- 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.
- MouseHoverTime
Gets or sets the duration, in milliseconds, that the mouse pointer must remain stationary within a control and hover rectangle for a hover event to be raised. Default value is 400 milliseconds.
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 increment 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
trueif the port has certain feature.
- IncVersion()
Increments the version number for the color configuration. This method is called internally when colors are reset, by ResetColors().
- InitDefaultFontSizeIncrement(int?)
Initializes IncFontSizeHighDpi and IncFontSize with the default values.
- IsDarkBackground(Color, Color)
Returns true if
backgroundColoris 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.