From wpf-dev-pack
Manages focus behavior for WPF Popup controls using PreviewMouseDown events and window activation. Use when Popup loses focus unexpectedly or needs to stay open during user interaction.
How this skill is triggered — by the user, by Claude, or both
Slash command
/wpf-dev-pack:managing-wpf-popup-focushaikuThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
In WPF, the Popup control only operates correctly when the WPF Application has focus. When focus moves to another application, the Popup may not display or function properly.
In WPF, the Popup control only operates correctly when the WPF Application has focus. When focus moves to another application, the Popup may not display or function properly.
When using the Popup control in WPF, you must forcibly acquire focus through the PreviewMouseDown event.
The templates folder contains a WPF project example (use latest .NET per version mapping).
templates/
└── WpfPopupSample.App/ ← WPF Application
├── Views/
│ ├── MainWindow.xaml
│ └── MainWindow.xaml.cs ← Focus management pattern implementation
├── App.xaml
├── App.xaml.cs
├── GlobalUsings.cs
└── WpfPopupSample.App.csproj
Window.GetWindow(this)?.Activate()⚠️ Important Notes:
npx claudepluginhub christian289/dotnet-with-claudecode --plugin wpf-dev-packGenerates boilerplate WPF Behavior<T> classes using Microsoft.Xaml.Behaviors.Wpf for reusable UI interactions like focus management, drag, or input handling on controls. Usage: /wpf-dev-pack:make-wpf-behavior <BehaviorName>
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.