RStyles class
public sealed class RStylesApplication styles written in code.
Constructors
RStyles()No styles yet: add them with For and Set.
Properties
int Count { get; }How many styles have been given.
Methods
RStyles For<T>(string cssClass = "")A new style for the controls of type T, or only those with the given class (as in «Button.toolbar»); the next Set calls fill it.
RStyles Set(AvaloniaProperty property, object value)A value of the last style started with For.
void Apply(Application app)Adds the styles to the application (after its theme).
void Apply(StyledElement element)Adds the styles to one control: they apply to it and to what is inside it, not to the rest of the application (a dense list in a log view, the look of one window).
static RStyles Clean()The ready-made set for tool applications. Classes: Button.toolbar (flat), Button.small (palettes), TextBlock.caption (section titles), TextBox.code (netlists, sources, numbers in columns), Border.droparea (a box to drop files on) and Border.drop (the same box while something it accepts is over it, RDrop). Set no border on the box itself: a local value wins over every style.
static void Accent(Application app, Color light, Color dark)The accent color of the Fluent theme in the two variants, with the three lighter and three darker shades (SystemAccentColorLight1-3, Dark1-3) at 15, 30 and 45% towards white or black.
Constants
const string Monospace = "Cascadia Mono, Consolas, Menlo, monospace"The monospaced fonts of the «code» class.