Theme Class
NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI
Central palette for TinyCLR.UI. Brushes are shared instances; change WindowBackground etc. then replace the corresponding brush field if you need live updates.
public static class Theme
Properties
WindowBackground
public static Color WindowBackground { get; set; }
The default background color for windows.
ControlSurface
public static Color ControlSurface { get; set; }
The default fill color for control surfaces.
TextBoxFill
public static Color TextBoxFill { get; set; }
The default fill color for text boxes.
TextPrimary
public static Color TextPrimary { get; set; }
The default color for primary text.
Border
public static Color Border { get; set; }
The default color for borders.
FocusRing
public static Color FocusRing { get; set; }
The default color for the focus ring drawn around focused controls.
SelectionHighlight
public static Color SelectionHighlight { get; set; }
The default color used to highlight selected content.
DefaultAlpha
public static ushort DefaultAlpha { get; set; }
Default Scale9Image alpha for surface-rendered controls (Button, CheckBox, RadioButton, ProgressBar, ComboBox, Slider). ~78% opacity.
DefaultRadiusBorder
public static int DefaultRadiusBorder { get; set; }
Default corner radius (in pixels) for Scale9Image-rendered surfaces.
Methods
SolidColorBrush( Colors.White)
public static readonly SolidColorBrush WindowBackgroundBrush = new SolidColorBrush(Colors.White)
The shared brush for window backgrounds.
Returns SolidColorBrush WindowBackgroundBrush = new
SolidColorBrush( Colors.LightGray)
public static readonly SolidColorBrush ControlSurfaceBrush = new SolidColorBrush(Colors.LightGray)
The shared brush for control surfaces.
Returns SolidColorBrush ControlSurfaceBrush = new
SolidColorBrush( Colors.White)
public static readonly SolidColorBrush TextBoxFillBrush = new SolidColorBrush(Colors.White)
The shared brush for text box fills.
Returns SolidColorBrush TextBoxFillBrush = new
SolidColorBrush( Colors.Black)
public static readonly SolidColorBrush TextPrimaryBrush = new SolidColorBrush(Colors.Black)
The shared brush for primary text.
Returns SolidColorBrush TextPrimaryBrush = new
SolidColorBrush( Colors.Teal)
public static readonly SolidColorBrush SelectionBrush = new SolidColorBrush(Colors.Teal)
The shared brush used to highlight selected content.
Returns SolidColorBrush SelectionBrush = new
RefreshBrushesFromColors()
public static void RefreshBrushesFromColors()
Call after mutating color fields if you need brushes to match.