wpf-rule-converter-patterns

Installation
SKILL.md

Converter Patterns

Standards for implementing IValueConverter in wpf-dev-pack projects.


MarkupExtension Singleton Pattern

Every converter is a MarkupExtension so it can be used directly in XAML without declaring a resource, and ProvideValue returns a single shared instance (converters are stateless, so a shared instance is safe and avoids ResourceDictionary clutter). This is the canonical converter pattern, matching the /wpf-dev-pack:make-wpf-converter scaffolder and the using-converter-markup-extension knowledge topic. Pick this one pattern — do NOT also expose a separate static Instance property.

Derive from a small base class (the scaffolder generates it once per project):

Installs
2
GitHub Stars
41
First Seen
Nov 6, 2026