Avalonia Code OnlyItaliano

API › RAVAL

RThemes class

public sealed class RThemes

The application colors for the light and the dark theme; Apply puts them in the resources.

Constructors

RThemes()

No colors yet: add them with Color, then call Apply.

Properties

int Count { get; }

How many colors have been given.

Methods

static RThemes Standard()

The colors RAVAL itself uses, ready: Back, Panel, Ink, InkSoft, Border, Bar, Tree, StatusBar, StatusInk, ChartBack, ChartGrid, ChartInk. The dark theme is a graphite with a hint of blue in three levels of light (the bar darkest, the documents, the panels lightest), so that the eye sees where a zone ends without heavy borders; the text is not pure white, which dazzles on a dark background. It is the palette of ASTRIP, made standard. Add the colors of the application with Color before Apply.

RThemes Color(string key, string light, string dark)

A color in its two versions, written as in HTML («#1a7fb5»).

RThemes Color(string key, uint light, uint dark)

A color in its two versions, as 0xAARRGGBB numbers.

void Apply(Application app)

Puts the colors in the application resources: they apply to every window.

void Apply(StyledElement element)

Puts the colors in the resources of a window or of a control: they apply only inside it.