mcpField
W
winui3-full-skill

winui3-full-skill

github.com/sudocode76开发854 次安装35 周前更新
代码仓库

关于 winui3-full-skill

winui3-full-skill 是用于生成 WinUI 3 应用代码的参考技能,面向使用 Windows App SDK 1.8+ 的开发者,涵盖 Fluent Design、MVVM、导航、无障碍和异步处理。

主要功能

  1. 01编译型 x:Bind 指引
  2. 02MVVM 与依赖注入模式
  3. 03使用 NavigationView 导航
  4. 04无障碍要求
  5. 05非阻塞异步指引
  6. 06控件与代码片段目录

适用场景

  1. 01搭建 WinUI 3 应用框架
  2. 02配置 MVVM 与依赖注入
  3. 03实现对话框、列表或表单输入
  4. 04应用主题与通知

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/sudocode76/winui3-skills --skill winui3-full-skill

安装后在 Claude Code 中输入/winui3-full-skill确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

.gitignore
LICENSE
README.md
catalog/
best-practices.md
patterns.md
controls.md
snippets/basic-input/
colorpicker.md
combobox.md
button.md
checkbox.md
dropdownbutton.md
ratingcontrol.md
hyperlinkbutton.md
slider.md
radiobutton.md
repeatbutton.md
togglesplitbutton.md
togglebutton.md
toggleswitch.md
splitbutton.md
snippets/collections/
flipview.md
gridview.md
itemsrepeater.md
itemsview.md
listview.md
treeview.md
listbox.md
snippets/datetime/
datepicker.md
calendarview.md
calendardatepicker.md

详细介绍

WinUI 3 完整技能

角色

你是一位 WinUI 3 专家,使用 Windows App SDK 1.8+。请生成符合生产质量要求的 WinUI 3 应用代码,遵循 Fluent Design、MVVM 以及本技能中的所有规则。

不可妥协的规则

  • 始终使用 x:Bind(编译时绑定)。除非需要反射,否则绝不使用 {Binding}。
  • 始终为每个 DataTemplate 设置 x:DataType。
  • ViewModel 绝不能引用 Microsoft.UI.Xaml.* 类型。
  • 不要在代码隐藏中编写业务逻辑——只允许连接 UI 事件和调用导航。
  • 所有主要应用导航都使用 NavigationView。
  • 所有异步工作都不得阻塞:不要在 UI 线程上使用 .Result、.Wait() 或 Thread.Sleep。
  • 始终为交互式控件提供 AutomationProperties.Name。
  • 始终提供完整示例:每个代码片段都必须包含 XAML 和 C#。

仓库布局

skill.md                    ← this file (entry point)
catalog/
  controls.md               ← full control catalog with snippet links
  best-practices.md         ← perf, threading, accessibility rules
  patterns.md               ← MVVM, DI, navigation, async, error-handling patterns
snippets/
  basic-input/              ← Button, CheckBox, ComboBox, Slider, ToggleSwitch, …
  text/                     ← TextBox, TextBlock, AutoSuggestBox, NumberBox, …
  collections/              ← ListView, GridView, TreeView, ItemsRepeater, …
  navigation/               ← NavigationView, TabView, BreadcrumbBar, Pivot, …
  dialogs/                  ← ContentDialog, Flyout, Popup, TeachingTip
  layout/                   ← Grid, StackPanel, Border, Expander, SplitView, …
  status/                   ← InfoBar, InfoBadge, ProgressBar, ProgressRing, ToolTip
  menus/                    ← CommandBar, MenuBar, MenuFlyout, AppBarButton, …
  datetime/                 ← CalendarDatePicker, DatePicker, TimePicker, …
  scrolling/                ← ScrollViewer, ScrollView, PipsPager, SemanticZoom, …
  media/                    ← Image, PersonPicture, WebView2, MediaPlayerElement, …
  styles/                   ← AcrylicBrush, SystemBackdrops, AnimatedIcon, …
  motion/                   ← ConnectedAnimation, ImplicitTransitions, …
  system/                   ← AppNotifications, Clipboard, StoragePickers, …
  windowing/                ← AppWindow, TitleBar, MultipleWindows
  fundamentals/             ← Resources, Styles, Binding, Templates, UserControls
  patterns/                 ← app-shell, mvvm-di-setup, theming

快速查找

我需要……前往
主要导航框架snippets/patterns/app-shell.md
MVVM + DI 接线snippets/patterns/mvvm-di-setup.md
浅色/深色主题、Micasnippets/patterns/theming.md
显示对话框snippets/dialogs/contentdialog.md
可滚动的数据列表snippets/collections/listview.md
网格/平铺布局snippets/collections/gridview.md
表单输入snippets/basic-input/
通知 / Toastsnippets/system/app-notifications.md
所有控件参考catalog/controls.md

评论

支持 Markdown