avalonia-layout-zafiro
Guidelines for modern Avalonia UI layout using Zafiro.Avalonia, emphasizing shared styles, generic components, and avoiding XAML redundancy.
Author
Category
Development ToolsInstall
Download and extract to your skills directory
Copy command and send to OpenClaw for auto-install:
Avalonia Layout with Zafiro.Avalonia - Modern UI Layout Guidelines
Skills Overview
Master modern, concise, and maintainable layout development for Avalonia UI; learn how to use Zafiro.Avalonia to implement semantic containers, shared styles, and write minimal XAML.
Applicable Scenarios
Core Features
HeaderedContainer, EdgePanel, and Card to replace tedious manual layout compositions, achieving a flatter view structure.axaml files, use DynamicResource to manage colors and brushes, avoiding hardcoding visual properties in views.Xaml.Interaction.Behaviors instead of code-behind and converters; simplify icon integration and style customization via IconExtension and IconOptions.Frequently Asked Questions
What is Zafiro.Avalonia? What layout problems can it solve?
Zafiro.Avalonia is an Avalonia UI extension library that provides semantic containers (such as HeaderedContainer and EdgePanel), icon extensions (IconExtension), and other components. It mainly addresses code redundancy, deep nesting, and maintenance difficulties in traditional XAML development, helping developers build cleaner UI layouts.
What's the difference between HeaderedContainer and Border?
HeaderedContainer is a semantic container specifically designed for content areas with headers; it includes header area layout and styles out of the box, whereas Border is just a general-purpose border container that requires manually composing Grid, TextBlock, and other elements to achieve a similar effect. Using HeaderedContainer can reduce XAML code and maintain layout consistency.
What advantages do Behaviors have over IValueConverter?
Behaviors can handle UI logic directly in the View without requiring dedicated properties in the ViewModel or creating separate converter classes. For simple interaction logic (such as disabling a button on click, or list item selection effects), Behaviors keep code more centralized and easier to maintain, and avoid the fragmentation of Converter classes.