跳到正文
Skillpedia
界面(UI/UX)48k · #3847

avalonia-viewmodels-zafiro

它能做什么

这个工具可以帮你使用推荐的设计模式,组织和创建桌面应用的部分内容(称为 ViewModel 和向导)。它能简化多步骤流程和应用内导航的搭建。

适用场景

  • ✓当你要开发一个新的图形界面应用时。
  • ✓当你需要一个多步骤流程(比如安装向导)时。
  • ✓当你想让应用的代码结构更清晰时。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/avalonia-viewmodels-zafiro/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该如何使用推荐的设计模式,为我的应用创建一个安装向导?”

每周 5 个新技能,1 分钟读完。

工作原理

它会借助 ReactiveUI 和 Zafiro 等库,定义用户数据和操作如何与界面连接。这样就能写出更智能的命令,并把分步流程组织得井井有条。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Avalonia ViewModels with Zafiro

This skill provides a set of best practices and patterns for creating ViewModels, Wizards, and managing navigation in Avalonia applications, leveraging the power of ReactiveUI and the Zafiro toolkit.

Core Principles

  1. Functional-Reactive Approach: Use ReactiveUI (ReactiveObject, WhenAnyValue, etc.) to handle state and logic.
  2. Enhanced Commands: Utilize IEnhancedCommand for better command management, including progress reporting and name/text attributes.
  3. Wizard Pattern: Implement complex flows using SlimWizard and WizardBuilder for a declarative and maintainable approach.
  4. Automatic Section Discovery: Use the [Section] attribute to register and discover UI sections automatically.
  5. Clean Composition: map ViewModels to Views using DataTypeViewLocator and manage dependencies in the CompositionRoot.

Guides

Example Reference

For real-world implementations, refer to the Angor project:

  • CreateProjectFlowV2.cs: Excellent example of complex Wizard building.
  • HomeViewModel.cs: Simple section ViewModel using functional-reactive commands.

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.
常见问题

什么是 ViewModel?

它是一段代码,负责管理某个用户界面页面或组件的数据和逻辑。

什么是向导?

它是一系列页面或步骤,引导用户完成某个流程,比如设置并安装软件。

什么是 ReactiveUI?

它是一个库,采用响应式编程的方式,帮助你创建响应更灵敏、更易于维护的用户界面。

详情

作者的原始描述

Optimal ViewModel and Wizard creation patterns for Avalonia using Zafiro and ReactiveUI.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#3847
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能