# dotnet-wpf-modern

A skill that steers your coding agent through modern WPF: generic host, MVVM Toolkit, Fluent theme, current C# features.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 301 installs · ★ 86
- Author: wshaddix
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/wshaddix/dotnet-skills/tree/HEAD/skills/dotnet-wpf-modern/SKILL.md
- Updated: 2026-02-27
- HTML: https://affpapa.org/en/nevibecode/skills/dotnet-wpf-modern

## What it does

The skill covers WPF as it looks on .NET 8 and later. Dependency injection through the generic host, MVVM built on CommunityToolkit.Mvvm source generators, faster rendering, and newer language features such as records and primary constructors all get worked examples. Fluent theming and system theme detection are marked as .NET 9 territory.

The baseline is .NET 8.0 with `net8.0-windows` as the target framework. Projects are SDK-style, so there is no `packages.config` and no `AssemblyInfo.cs`; nullable reference types and implicit usings are on. Sample code pulls in `CommunityToolkit.Mvvm` and `Microsoft.Extensions.Hosting`.

Scope is narrow on purpose. Moving an existing app off .NET Framework belongs to `dotnet-wpf-migration`, desktop testing to `dotnet-ui-testing-core`, and picking a UI framework to `dotnet-ui-chooser`. If your job is the migration itself, look elsewhere — this one stays on .NET 8+.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/dotnet-wpf-modern/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/dotnet-wpf-modern/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/dotnet-wpf-modern/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/dotnet-wpf-modern/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install wshaddix/dotnet-skills dotnet-wpf-modern
```

2. **Manually: put the files in place**
- File: `.github/skills/dotnet-wpf-modern/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/wshaddix/dotnet-skills --path skills/dotnet-wpf-modern
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/dotnet-wpf-modern/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/wshaddix/dotnet-skills/tree/HEAD/skills/dotnet-wpf-modern/SKILL.md

## When to use it
- wire up a WPF app with the generic host and dependency injection
- drop ViewModel boilerplate using CommunityToolkit.Mvvm generators
- apply the Fluent theme and detect the system theme
- use records, primary constructors and pattern matching in C#
- see what changed between .NET Framework WPF and .NET 8

## Example prompts
- Set up `App.xaml.cs` with a host builder and register my services and ViewModels
- Rewrite this ViewModel with CommunityToolkit.Mvvm: `[ObservableProperty]` for state, `[RelayCommand]` for actions
- Add Fluent theming and system theme detection to my .NET 9 app

## Similar
- [frontend-design](https://affpapa.org/en/nevibecode/skills/frontend-design.md) — skill · 1025790 installs
- [design-taste-frontend](https://affpapa.org/en/nevibecode/skills/design-taste-frontend.md) — skill · 678700 installs
- [prototype](https://affpapa.org/en/nevibecode/skills/prototype.md) — skill · 986201 installs
- [hyperframes](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes.md) — skill · 1200000 installs
- [hyperframes-cli](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes-cli.md) — skill · 1300000 installs
- [webapp-testing](https://affpapa.org/en/nevibecode/skills/webapp-testing.md) — skill · 186758 installs

From the same set: [wshaddix/dotnet-skills](https://affpapa.org/en/nevibecode/by/wshaddix/dotnet-skills.md) — 13 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
