Class ThemeHelper

Central theme color provider for all visualization components.

Two categories:

  1. Avalonia controls — use DynamicResourceExtension with the string constants:

    control[!Border.BackgroundProperty] = new DynamicResourceExtension(ThemeHelper.ChartBackgroundBrush);
  2. SkiaSharp/LiveCharts paints — use the static SKColor properties directly:

    var paint = new SolidColorPaint(ThemeHelper.ChartAxisLabel);
Inheritance
ThemeHelper
Namespace: MOSAIC.Visualization
Assembly: MOSAIC.dll
Syntax
public static class ThemeHelper

Fields

AccentBrush

Declaration
public const string AccentBrush = "ThemeAccentBrush"
Field Value
Type Description
string

BorderBrush

Declaration
public const string BorderBrush = "ThemeBorderBrush"
Field Value
Type Description
string

ChartBackgroundBrush

Declaration
public const string ChartBackgroundBrush = "ThemeChartBackgroundBrush"
Field Value
Type Description
string

SectionBrush

Declaration
public const string SectionBrush = "ThemeSectionBrush"
Field Value
Type Description
string

TextDimmedBrush

Declaration
public const string TextDimmedBrush = "ThemeTextDimmedBrush"
Field Value
Type Description
string

TextPrimaryBrush

Declaration
public const string TextPrimaryBrush = "ThemeTextPrimaryBrush"
Field Value
Type Description
string

TextSecondaryBrush

Declaration
public const string TextSecondaryBrush = "ThemeTextSecondaryBrush"
Field Value
Type Description
string

Properties

ChartAxisLabel

Axis label paint color — full opacity for readability.

Declaration
public static SKColor ChartAxisLabel { get; }
Property Value
Type Description
SKColor

ChartBackground

Chart background as Avalonia Color.

Declaration
public static Color ChartBackground { get; }
Property Value
Type Description
Color

ChartGrid

Grid line paint color.

Declaration
public static SKColor ChartGrid { get; }
Property Value
Type Description
SKColor

ChartTick

Tick mark paint color.

Declaration
public static SKColor ChartTick { get; }
Property Value
Type Description
SKColor

ChartZeroLine

Zero line paint color (scope only).

Declaration
public static SKColor ChartZeroLine { get; }
Property Value
Type Description
SKColor

IsDark

Declaration
private static bool IsDark { get; }
Property Value
Type Description
bool

Methods

GetBrush(string)

Declaration
public static IBrush GetBrush(string resourceKey)
Parameters
Type Name Description
string resourceKey
Returns
Type Description
IBrush

Search documentation

Start typing to search the documentation.