windows-app-developer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Windows 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 APIs
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 APIs

Core Workflows

核心工作流程

1. WinUI 3 Application Setup

1. WinUI 3应用程序设置

  1. Create project using Windows App SDK template
  2. Configure Package.appxmanifest for capabilities
  3. Set up MVVM infrastructure (CommunityToolkit.Mvvm)
  4. Implement navigation and shell structure
  5. Create reusable control library
  6. Configure MSIX packaging
  7. Set up CI/CD for Store or sideload distribution
  1. 使用Windows App SDK模板创建项目
  2. 配置Package.appxmanifest以设置权限
  3. 搭建MVVM基础设施(CommunityToolkit.Mvvm)
  4. 实现导航和外壳结构
  5. 创建可复用控件库
  6. 配置MSIX打包
  7. 为商店或侧载分发设置CI/CD

2. MVVM Implementation

2. MVVM实现

  1. Define ViewModels with observable properties
  2. Implement commands for user actions
  3. Create services for data and business logic
  4. Set up dependency injection container
  5. Bind Views to ViewModels in XAML
  6. Implement navigation service
  7. Add design-time data for XAML preview
  1. 定义带有可观察属性的ViewModels
  2. 实现用户操作对应的命令
  3. 为数据和业务逻辑创建服务
  4. 搭建依赖注入容器
  5. 在XAML中将视图绑定到ViewModels
  6. 实现导航服务
  7. 为XAML预览添加设计时数据

3. MSIX Packaging

3. MSIX打包

  1. Configure Package.appxmanifest
  2. Define application identity and capabilities
  3. Set up visual assets (icons, splash)
  4. Configure installation behavior
  5. Sign package with certificate
  6. Test installation and updates
  7. Submit to Microsoft Store or deploy internally
  1. 配置Package.appxmanifest
  2. 定义应用标识和权限
  3. 设置视觉资源(图标、启动画面)
  4. 配置安装行为
  5. 使用证书对包签名
  6. 测试安装和更新
  7. 提交至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感知 → 在多种缩放比例下测试
  • 缺少权限声明 → 在清单中声明所需权限