These instructions guide GitHub Copilot to assist with building high-quality, maintainable, and performant WPF applications using the MVVM pattern. It includes best practices for XAML, data binding, UI responsiveness, and .NET performance.
Ideal project types
Desktop applications using C# and WPF
Applications following the MVVM (Model-View-ViewModel) design pattern
Projects using .NET 8.0 or later
UI components built in XAML
Solutions emphasizing performance and responsiveness
Goals
Generate boilerplate for INotifyPropertyChanged and RelayCommand
Suggest clean separation of ViewModel and View logic
Encourage use of ObservableCollection<T>, ICommand, and proper binding
1---2name: dotnet-wpf-23description: Summary4---5## Summary67These instructions guide GitHub Copilot to assist with building high-quality, maintainable, and performant WPF applications using the MVVM pattern. It includes best practices for XAML, data binding, UI responsiveness, and .NET performance.89## Ideal project types1011- Desktop applications using C# and WPF12- Applications following the MVVM (Model-View-ViewModel) design pattern13- Projects using .NET 8.0 or later14- UI components built in XAML15- Solutions emphasizing performance and responsiveness1617## Goals1819- Generate boilerplate for `INotifyPropertyChanged` and `RelayCommand`20- Suggest clean separation of ViewModel and View logic21- Encourage use of `ObservableCollection<T>`, `ICommand`, and proper binding22- Recommend performance tips (e.g., virtualization, async loading)23- Avoid tightly coupling code-behind logic24- Produce testable ViewModels2526## Example prompt behaviors2728### ✅ Good Suggestions29- "Generate a ViewModel for a login screen with properties for username and password, and a LoginCommand"30- "Write a XAML snippet for a ListView that uses UI virtualization and binds to an ObservableCollection"31- "Refactor this code-behind click handler into a RelayCommand in the ViewModel"32- "Add a loading spinner while fetching data asynchronously in WPF"3334### ❌ Avoid35- Suggesting business logic in code-behind36- Using static event handlers without context37- Generating tightly coupled XAML without binding38- Suggesting WinForms or UWP approaches3940## Technologies to prefer41- C# with .NET 8.0+42- XAML with MVVM structure43- `CommunityToolkit.Mvvm` or custom `RelayCommand` implementations44- Async/await for non-blocking UI45- `ObservableCollection`, `ICommand`, `INotifyPropertyChanged`4647## Common Patterns to Follow48- ViewModel-first binding49- Dependency Injection using .NET or third-party containers (e.g., Autofac, SimpleInjector)50- XAML naming conventions (PascalCase for controls, camelCase for bindings)51- Avoiding magic strings in binding (use `nameof`)5253## Sample Instruction Snippets Copilot Can Use5455```csharp56public class MainViewModel : ObservableObject57{58 [ObservableProperty]59 private string userName;6061 [ObservableProperty]62 private string password;6364 [RelayCommand]65 private void Login()66 {67 // Add login logic here68 }69}70```7172```xml73<StackPanel>74 <TextBox Text="{Binding UserName, UpdateSourceTrigger=PropertyChanged}" />75 <PasswordBox x:Name="PasswordBox" />76 <Button Content="Login" Command="{Binding LoginCommand}" />77</StackPanel>78```
Run npx skillmds@latest add diegosouzapw/dotnet-wpf-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Summary It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
diegosouzapw (@diegosouzapw) published this skill. Their other Agent Skills are listed on their SkillMD profile.