Class ThemeHelper
Central theme color provider for all visualization components.
Two categories:
Avalonia controls — use DynamicResourceExtension with the string constants:
control[!Border.BackgroundProperty] = new DynamicResourceExtension(ThemeHelper.ChartBackgroundBrush);
SkiaSharp/LiveCharts paints — use the static SKColor properties directly:
var paint = new SolidColorPaint(ThemeHelper.ChartAxisLabel);
Assembly: MOSAIC.dll
Syntax
public static class ThemeHelper
Fields
AccentBrush
Declaration
public const string AccentBrush = "ThemeAccentBrush"
Field Value
BorderBrush
Declaration
public const string BorderBrush = "ThemeBorderBrush"
Field Value
ChartBackgroundBrush
Declaration
public const string ChartBackgroundBrush = "ThemeChartBackgroundBrush"
Field Value
SectionBrush
Declaration
public const string SectionBrush = "ThemeSectionBrush"
Field Value
TextDimmedBrush
Declaration
public const string TextDimmedBrush = "ThemeTextDimmedBrush"
Field Value
TextPrimaryBrush
Declaration
public const string TextPrimaryBrush = "ThemeTextPrimaryBrush"
Field Value
TextSecondaryBrush
Declaration
public const string TextSecondaryBrush = "ThemeTextSecondaryBrush"
Field Value
Properties
ChartAxisLabel
Axis label paint color — full opacity for readability.
Declaration
public static SKColor ChartAxisLabel { get; }
Property Value
ChartBackground
Chart background as Avalonia Color.
Declaration
public static Color ChartBackground { get; }
Property Value
ChartGrid
Declaration
public static SKColor ChartGrid { get; }
Property Value
ChartTick
Declaration
public static SKColor ChartTick { get; }
Property Value
ChartZeroLine
Zero line paint color (scope only).
Declaration
public static SKColor ChartZeroLine { get; }
Property Value
IsDark
Declaration
private static bool IsDark { get; }
Property Value
Methods
GetBrush(string)
Declaration
public static IBrush GetBrush(string resourceKey)
Parameters
| Type |
Name |
Description |
| string |
resourceKey |
|
Returns