designing-avalonia-customcontrol-architecture

Solid

Defines the basic solution structure for AvaloniaUI Desktop Applications using CustomControl. Use when creating new AvaloniaUI projects or designing stand-alone control styles with ControlTheme.

Web & Frontend 40 stars 6 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
54
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 6.5 Writing AXAML Code - **When generating AXAML code, use CustomControl with ControlTheme for Stand-Alone Control Style** - Purpose: Theme separation and minimizing style dependencies #### 6.5.1 AvaloniaUI Custom Control Library Project Structure **Recommended Project Structure:** ``` YourAvaloniaSolution ├── YourCustomControlProject1/ │ ├── Properties/ │ │ ├── AssemblyInfo.cs ← AssemblyInfo.cs definition │ ├── Themes/ │ │ ├── Generic.axaml ← ControlTheme definition │ │ ├── CustomButton1.axaml ← Individual control theme │ │ └── CustomTextBox1.axaml ← Individual control theme │ ├── CustomButton1.cs │ └── CustomTextBox1.cs └── YourCustomControlProject2/ ├── Properties/ │ ├── AssemblyInfo.cs ← AssemblyInfo.cs definition ├── Themes/ │ ├── Generic.axaml ← ControlTheme definition │ ├── CustomButton2.axaml ← Individual control theme │ └── CustomTextBox2.axaml ← Individual control theme ├── CustomButton2.cs └── CustomTextBox2.cs ``` # 6.6 ⚠️ Distinguishing ResourceInclude vs MergeResourceInclude - **ResourceInclude**: Used in regular ResourceDictionary files (Generic.axaml, Styles, etc.) - **MergeResourceInclude**: Used only in Application.Resources (App.axaml) **Advantages:** - Complete separation of theme and logic based on ControlTheme - Flexible style variations through CSS Classes - State management via Pseudo Classes (:pointerover,...

Details

Author
christian289
Repository
christian289/dotnet-with-claudecode
Created
7 months ago
Last Updated
6 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category