windows-app-developer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWindows App Developer
Windows应用开发者
Purpose
用途
Provides expertise in building modern Windows desktop applications using WinUI 3, WPF, and Windows App SDK. Specializes in XAML-based UI development, MVVM architecture, native Windows integration, and modern packaging with MSIX.
提供使用WinUI 3、WPF和Windows App SDK构建现代Windows桌面应用程序的专业知识,专长于基于XAML的UI开发、MVVM架构、原生Windows集成以及使用MSIX进行现代打包。
When to Use
适用场景
- Building Windows desktop applications with WinUI 3 or WPF
- Implementing MVVM architecture for Windows apps
- Creating XAML layouts and custom controls
- Packaging applications with MSIX
- Integrating with Windows features (notifications, taskbar, system tray)
- Migrating WPF applications to WinUI 3
- Implementing Windows-specific features (jump lists, live tiles)
- Building Microsoft Store-ready applications
- 使用WinUI 3或WPF构建Windows桌面应用程序
- 为Windows应用实现MVVM架构
- 创建XAML布局和自定义控件
- 使用MSIX打包应用程序
- 与Windows功能集成(通知、任务栏、系统托盘)
- 将WPF应用迁移到WinUI 3
- 实现Windows特定功能(跳转列表、动态磁贴)
- 构建可提交至Microsoft Store的应用程序
Quick Start
快速开始
Invoke this skill when:
- Building Windows desktop applications with WinUI 3 or WPF
- Implementing MVVM architecture for Windows apps
- Creating XAML layouts and custom controls
- Packaging applications with MSIX
- Integrating with Windows features (notifications, taskbar)
Do NOT invoke when:
- Building cross-platform apps → use mobile-developer or electron-pro
- Console applications → use appropriate language skill
- PowerShell GUI → use powershell-ui-architect
- Web applications → use appropriate web skill
在以下场景调用此技能:
- 使用WinUI 3或WPF构建Windows桌面应用程序
- 为Windows应用实现MVVM架构
- 创建XAML布局和自定义控件
- 使用MSIX打包应用程序
- 与Windows功能集成(通知、任务栏)
请勿在以下场景调用:
- 构建跨平台应用 → 使用mobile-developer或electron-pro
- 控制台应用 → 使用相应的语言技能
- PowerShell GUI → 使用powershell-ui-architect
- Web应用 → 使用相应的Web技能
Decision Framework
决策框架
Windows App Task?
├── New Modern App → WinUI 3 with Windows App SDK
├── Existing WPF App → Maintain or migrate to WinUI 3
├── Cross-Platform Priority → Consider .NET MAUI
├── Enterprise Internal → WPF with proven patterns
├── Store Distribution → MSIX packaging required
└── System Integration → P/Invoke or Windows SDK APIsWindows App Task?
├── New Modern App → WinUI 3 with Windows App SDK
├── Existing WPF App → Maintain or migrate to WinUI 3
├── Cross-Platform Priority → Consider .NET MAUI
├── Enterprise Internal → WPF with proven patterns
├── Store Distribution → MSIX packaging required
└── System Integration → P/Invoke or Windows SDK APIsCore Workflows
核心工作流程
1. WinUI 3 Application Setup
1. WinUI 3应用程序设置
- Create project using Windows App SDK template
- Configure Package.appxmanifest for capabilities
- Set up MVVM infrastructure (CommunityToolkit.Mvvm)
- Implement navigation and shell structure
- Create reusable control library
- Configure MSIX packaging
- Set up CI/CD for Store or sideload distribution
- 使用Windows App SDK模板创建项目
- 配置Package.appxmanifest以设置权限
- 搭建MVVM基础设施(CommunityToolkit.Mvvm)
- 实现导航和外壳结构
- 创建可复用控件库
- 配置MSIX打包
- 为商店或侧载分发设置CI/CD
2. MVVM Implementation
2. MVVM实现
- Define ViewModels with observable properties
- Implement commands for user actions
- Create services for data and business logic
- Set up dependency injection container
- Bind Views to ViewModels in XAML
- Implement navigation service
- Add design-time data for XAML preview
- 定义带有可观察属性的ViewModels
- 实现用户操作对应的命令
- 为数据和业务逻辑创建服务
- 搭建依赖注入容器
- 在XAML中将视图绑定到ViewModels
- 实现导航服务
- 为XAML预览添加设计时数据
3. MSIX Packaging
3. MSIX打包
- Configure Package.appxmanifest
- Define application identity and capabilities
- Set up visual assets (icons, splash)
- Configure installation behavior
- Sign package with certificate
- Test installation and updates
- Submit to Microsoft Store or deploy internally
- 配置Package.appxmanifest
- 定义应用标识和权限
- 设置视觉资源(图标、启动画面)
- 配置安装行为
- 使用证书对包签名
- 测试安装和更新
- 提交至Microsoft Store或内部部署
Best Practices
最佳实践
- Use WinUI 3 for new development, WPF for legacy maintenance
- Implement MVVM strictly for testability and separation
- Use x:Bind for compile-time binding validation
- Leverage Community Toolkit for common patterns
- Package with MSIX for modern installation experience
- Follow Fluent Design System for consistent UX
- 新开发使用WinUI 3,遗留维护使用WPF
- 严格实现MVVM以提升可测试性和关注点分离
- 使用x:Bind进行编译时绑定验证
- 利用Community Toolkit实现常见模式
- 使用MSIX打包以获得现代安装体验
- 遵循Fluent Design System以保证一致的用户体验
Anti-Patterns
反模式
- Code-behind logic → Move to ViewModels
- Synchronous UI operations → Use async/await for I/O
- Direct service calls from Views → Go through ViewModels
- Ignoring DPI awareness → Test at multiple scale factors
- Missing capabilities → Declare required capabilities in manifest
- 代码后置逻辑 → 迁移至ViewModels
- 同步UI操作 → 对I/O操作使用async/await
- 从视图直接调用服务 → 通过ViewModels进行
- 忽略DPI感知 → 在多种缩放比例下测试
- 缺少权限声明 → 在清单中声明所需权限