davila7/claude-code-templates / cli-tool/components/skills/development/avalonia-layout-zafiro
avalonia-layout-zafiro
VerifiedGuidelines for modern Avalonia UI layout using Zafiro.Avalonia, emphasizing shared styles, generic components, and avoiding XAML redundancy.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.3 KB |
| behaviors.md | markdown | 1.4 KB |
| components.md | markdown | 1.4 KB |
| containers.md | markdown | 1.5 KB |
| icons.md | markdown | 1.7 KB |
| themes.md | markdown | 1.8 KB |
containers.md
View on GitHub# Semantic Containers
Using the right container for the data type simplifies XAML and improves maintainability. `Zafiro.Avalonia` provides specialized controls for common layout patterns.
## 📦 HeaderedContainer
Prefer `HeaderedContainer` over a `Border` or `Grid` when a section needs a title or header.
```xml
<HeaderedContainer Header="Security Settings" Classes="WizardSection">
<StackPanel>
<!-- Content here -->
</StackPanel>
</HeaderedContainer>
```
### Key Properties:
- `Header`: The content or string for the header.
- `HeaderBackground`: Brush for the header area.
- `ContentPadding`: Padding for the content area.
## ↔️ EdgePanel
Use `EdgePanel` to position elements at the edges of a container without complex `Grid` definitions.
```xml
<EdgePanel StartContent="{Icon fa-wallet}"
Content="Wallet Balance"
EndContent="$1,234.00" />
```
### Slots:
- `StartContent`: Aligned to the left (or beginning).
- `Content`: Fills the remaining space in the middle.
- `EndContent`: Aligned to the right (or end).
## 📇 Card
A simple container for grouping related information, often used inside `HeaderedContainer` or as a standalone element in a list.
```xml
<Card Header="Enter recipient address:">
<TextBox Text="{Binding Address}" />
</Card>
```
## 📐 Best Practices
- Use `Classes` to apply themed variants (e.g., `Classes="Section"`, `Classes="Highlight"`).
- Customize internal parts of the containers using templates in your styles when necessary, rather than nesting more controls.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |