Configuration

Acss supports some configurations, which are placed in the configuration service (IAcssConfiguration). You can read and write the configuration through AcssContext.

var cfg = AcssContext.Default.GetService<IAcssConfiguration>();

cfg.Accent = "green";
cfg.EnableTransitions = true;

Acss Configuration currently only supports setting the theme colour (Accent), whether to enable transitions (EnableTransitions) and the theme. The first two are defined in IAcssConfiguration. The last one, Theme, is affected by Avalonia's ThemeVariant.

Other configurations to come, feel free to provide new scenarios and requirements here.

Last updated