Avalonia Css
Source CodeδΈ­ζ–‡
  • Documentation
    • πŸŽ†Welcome
    • πŸŒοΈβ€β™‚οΈGet started
      • About Acss
      • Processes and concepts
      • Security
      • Performance Evaluation
      • Configuring the development environment
      • Debugging
      • About source code
      • FAQ
    • ❓How-to
      • Using Acss
        • Type Resolution
        • Configuration
        • Code Source
        • Extending Resources
      • Using Acss.Controls
      • Using Acss.Fluent
      • Using MessageBox
      • Using Senior
      • Using Acss.Behaviors
    • πŸ“Acss Syntax
      • Comment
      • Resource
      • Style
      • Animation
      • Behavior
    • πŸ’ŽBest Practices
      • Define a good control template
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Documentation
  2. How-to
  3. Using Acss

Configuration

PreviousType ResolutionNextCode Source

Last updated 1 year ago

Was this helpful?

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