Skip to content
Back to skills

Designing Avalonia Customcontrol Architecture

ASecurity

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.

  • 207 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 7, 2026
content-media

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned February 10, 2026

npx -y skills add NeverSight/skills_feed --skill designing-avalonia-customcontrol-architecture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Designing Avalonia Customcontrol Architecture?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Designing Avalonia Customcontrol Architecture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-designing-avalonia-customcontrol-architecture/badge)](https://www.skillsdirectory.com/skills/neversight-designing-avalonia-customcontrol-architecture)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: designing-avalonia-customcontrol-architecture
description: "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."
---

# 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, :pressed, etc.)
- Theme modularization through ResourceInclude
- Work can be split by file for team collaboration

#### 6.5.2 Key Differences Between WPF and AvaloniaUI

| Item              | WPF                                     | AvaloniaUI                           |
| ----------------- | --------------------------------------- | ------------------------------------ |
| File Extension    | .xaml                                   | .axaml                               |
| Style Definition  | Style + ControlTemplate                 | ControlTheme                         |
| State Management  | Trigger, DataTrigger                    | Pseudo Classes, Style Selector       |
| CSS Support       | ❌                                      | ✅ (Classes attribute)               |
| Resource Merging  | MergedDictionaries + ResourceDictionary | MergedDictionaries + ResourceInclude |
| Dependency Props  | DependencyProperty                      | StyledProperty, DirectProperty       |

Files in this skill

  • SKILL.md2.9 KB
  • description_cn.txt180 B
  • description_de.txt234 B
  • description_en.txt195 B
  • description_es.txt231 B
  • description_fr.txt252 B
  • description_ja.txt346 B
  • description_ko.txt273 B
  • description_tw.txt180 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…