Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)48k · #3846

avalonia-layout-zafiro

Skill này làm gì

Hướng dẫn này chỉ cách tạo giao diện người dùng đẹp và dễ bảo trì cho ứng dụng Avalonia. Nó tập trung vào việc dùng các thành phần thông minh và kiểu dáng chung để tránh lặp lại và đơn giản hóa mã.

Khi nào nên dùng

  • ✓Khi bạn bắt đầu một dự án Avalonia mới và muốn có cấu trúc tốt.
  • ✓Khi bạn cần sắp xếp hoặc cải thiện kiểu dáng giao diện của ứng dụng.
  • ✓Khi bạn gặp khó khăn trong việc sắp xếp bố cục của một màn hình.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/avalonia-layout-zafiro/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/avalonia-layout-zafiro/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm thế nào để sắp xếp các kiểu dáng giao diện trong ứng dụng Avalonia để dễ tái sử dụng?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

AI đọc hướng dẫn về cách sắp xếp bố cục trong Avalonia, tập trung vào việc dùng các thành phần có sẵn và kiểu dáng dùng chung. Nó tránh lặp lại mã và đề xuất cách tốt nhất để tổ chức các màn hình.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Avalonia Layout with Zafiro.Avalonia

Master modern, clean, and maintainable Avalonia UI layouts. Focus on semantic containers, shared styles, and minimal XAML.

🎯 Selective Reading Rule

Read ONLY files relevant to the layout challenge!


📑 Content Map

File Description When to Read
themes.md Theme organization and shared styles Setting up or refining app themes
containers.md Semantic containers (HeaderedContainer, EdgePanel, Card) Structuring views and layouts
icons.md Icon usage with IconExtension and IconOptions Adding and customizing icons
behaviors.md Xaml.Interaction.Behaviors and avoiding Converters Implementing complex interactions
components.md Generic components and avoiding nesting Creating reusable UI elements

🔗 Related Project (Exemplary Implementation)

For a real-world example, refer to the Angor project: /mnt/fast/Repos/angor/src/Angor/Avalonia/Angor.Avalonia.sln


✅ Checklist for Clean Layouts

  • Used semantic containers? (e.g., HeaderedContainer instead of Border with manual header)
  • Avoided redundant properties? Use shared styles in axaml files.
  • Minimized nesting? Flatten layouts using EdgePanel or generic components.
  • Icons via extension? Use {Icon fa-name} and IconOptions for styling.
  • Behaviors over code-behind? Use Interaction.Behaviors for UI-logic.
  • Avoided Converters? Prefer ViewModel properties or Behaviors unless necessary.

❌ Anti-Patterns

DON'T:

  • Use hardcoded colors or sizes (literals) in views.
  • Create deep nesting of Grid and StackPanel.
  • Repeat visual properties across multiple elements (use Styles).
  • Use IValueConverter for simple logic that belongs in the ViewModel.

DO:

  • Use DynamicResource for colors and brushes.
  • Extract repeated layouts into generic components.
  • Leverage Zafiro.Avalonia specific panels like EdgePanel for common UI patterns.

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Câu hỏi thường gặp

“Semantic containers” là gì?

Đó là các khối giao diện đã có chức năng rõ ràng, như tiêu đề hay thanh bên, thay vì dùng các phần tử chung chung và phải cấu hình thủ công.

Vì sao nên tránh “redundant properties” (thuộc tính dư thừa)?

Lặp lại cùng một thiết lập giao diện (màu sắc, kích thước) ở nhiều nơi khiến mã dài hơn và khó cập nhật hơn. Dùng kiểu dáng chung sẽ giải quyết việc này.

“Anti-patterns” là gì?

Đó là các cách làm phổ biến có vẻ hoạt động nhưng về sau gây vấn đề, như khó bảo trì hoặc giảm hiệu năng. Hướng dẫn này chỉ ra những điều cần tránh.

Chi tiết

Mô tả gốc của tác giả

Guidelines for modern Avalonia UI layout using Zafiro.Avalonia, emphasizing shared styles, generic components, and avoiding XAML redundancy.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#3846
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự