designing-avalonia-customcontrol-architecture

Design scalable Angular apps with reusable components and services.

40|5|Updated Dec 9, 2025
One-click install
npx skills add https://github.com/christian289/dotnet-with-claudecode --skill designing-avalonia-customcontrol-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: designing-avalonia-customcontrol-architecture
Source: https://github.com/christian289/dotnet-with-claudecode/tree/main/.claude/skills/designing-avalonia-customcontrol-architecture
Command: npx skills add https://github.com/christian289/dotnet-with-claudecode --skill designing-avalonia-customcontrol-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Defines the standard solution structure for AvaloniaUI Desktop Applications using CustomControl, enabling consistent project setups and scalable UI architecture.

Core Features & Use Cases

  • Defines a recommended folder layout and file organization for CustomControl-driven Avalonia projects.
  • Explains how to structure Themes, Generic.axaml, and control classes for reusable, themeable components.
  • Use Case: When starting a new AvaloniaUI app, follow this structure to separate visuals from logic and streamline theming.

Quick Start

Create a new AvaloniaUI solution following this architecture with a Themes directory containing Generic.axaml and your CustomControl files.

Frequently Asked Questions about designing-avalonia-customcontrol-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an AvaloniaUI project for modular CustomControls?

To structure AvaloniaUI CustomControls, use a dedicated Themes directory containing Generic.axaml and your control classes. This layout enforces a clear separation of concerns between control visuals and behavior, enabling scalable UI architecture.

What is the best way to organize Generic.axaml in an Avalonia desktop application?

Organize Generic.axaml within a central Themes directory. This placement standardizes ControlTheme definitions for your CustomControls, ensuring consistent modular theming and reusable component styling across the AvaloniaUI project.

How do you separate visuals from behavior when building Avalonia CustomControls?

You separate visuals from behavior by defining appearance in AXAML ControlThemes and logic in code-behind classes. This architecture isolates UI styling from functional behavior, creating highly reusable and themeable Avalonia components.

When do I need a dedicated Themes folder for AvaloniaUI CustomControls?

You need a dedicated Themes folder when starting a new AvaloniaUI project or building standalone styling workflows. It centralizes ControlTheme management and Generic.axaml placement, ensuring strict separation of visual concerns from control behavior.

Does this Avalonia CustomControl architecture work for standalone control styling?

Yes, this CustomControl architecture applies to both new AvaloniaUI desktop applications and standalone control styling workflows. It defines the standard solution structure, guiding project layout and modular theming for reusable components.

Why use ControlTheme for Avalonia CustomControls instead of inline styling?

Using ControlTheme for Avalonia CustomControls enforces modular theming and a clear separation of concerns. It standardizes visual definitions in Generic.axaml, preventing scattered inline styles and ensuring scalable, reusable component architecture.