Loading...
Loading...
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.
npx skill4agent add christian289/dotnet-with-claudecode designing-avalonia-customcontrol-architectureYourAvaloniaSolution
├── 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| 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 |