本文へスキップ
Skillpedia
インターフェース(UI/UX)48k · #3846

avalonia-layout-zafiro

できること

このガイドでは、Avaloniaアプリケーション向けに、見た目が美しく保守しやすいユーザーインターフェースを作る方法を解説します。スマートなコンポーネントと共通のスタイルを使い、繰り返しを避けてコードを簡単にすることに重点を置いています。

使う場面

  • ✓Avaloniaの新しいプロジェクトを始めて、良い構成にしたいとき。
  • ✓アプリの見た目のスタイルを整理したり、改善したりしたいとき。
  • ✓画面のレイアウトをうまく整理できず困っているとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/avalonia-layout-zafiro/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Avaloniaアプリの見た目のスタイルを、再利用しやすいように整理するにはどうすればよいですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

AIは、Avaloniaでレイアウトを整理する方法に関する手順を読み込みます。既成のコンポーネントと共通のスタイルを使うことに焦点を当て、コードの繰り返しを避け、画面の最適な構成方法を提案します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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.
よくある質問

「セマンティックコンテナ」とは何ですか?

ヘッダーやサイドパネルのように、役割がはっきりしたUIの部品のことです。汎用的な要素を使い、一つ一つ手作業で設定する必要をなくしてくれます。

「冗長なプロパティ」はなぜ避けるべきなのですか?

色やサイズなどの同じ見た目の設定を複数の場所で繰り返すと、コードが大きくなり、後で修正しにくくなるためです。共通のスタイルを使えばこの問題を解決できます。

「アンチパターン」とは何ですか?

一見うまくいくように見えても、後で保守が難しくなったり、性能の問題が起きたりする、よくある良くない書き方のことです。このガイドでは、避けるべき方法を示しています。

詳細

作者による元の説明

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

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#3846
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル