.NETFramework4.7.2net8.0-windows7.0
Automatically implements WPF dependency properties from a C# automatic property and WPF commands from a C# method thanks to Metalama.
Published
Jul 21, 2026
2mo ago
Total Downloads
21.3K
21,286
Install
dotnet add package Metalama.Patterns.Wpf --version 2026.1.21
| Product | Versions |
|---|---|
| .NET | |
| Other |
README
About
The Metalama.Patterns.Wpf contains aspects that implement WPF dependency properties and commands.
Key Features
- Generates WPF dependency properties from C# automatic properties:
- Integrates with
Metalama.Patterns.Contracts. - Supports custom property-changing and property-changed methods.
- Turns property initializer values into default values.
- Generates WPF commands from C# methods:
- Supports a
CanExecutemethod or property. - Integrates with
Metalama.Patterns.Observabilityto supportINotifyPropertyChanged.
- Supports a
- Supports custom naming conventions.
Main Types
The primary types in this package are:
DependencyPropertyAttributeis an aspect that generates a WPF dependency property from a plain automatic property.CommandAttributeis an aspect that generates a WPF command property from a plain C# method.DependencyPropertyExtensions.ConfigureDependencyPropertyis a fabric extension method that configures theDependencyPropertyAttributeaspect.CommandExtensions.ConfigureCommandis a fabric extension method that configures theCommandAttributeaspect.
Additional Documentation
- Conceptual documentation:
- API documentation
Related Packages
Metalama.Patterns.Contractsprovides contract attributes such as[NotNull]or[Url]. They integrate with theDependencyPropertyAttributeaspect.Metalama.Patterns.Observabilitycan implementINotifyPropertyChangedfor theCanExecuteproperty supported by theCommandAttributeaspect.
Changes from Previous Version
No structural changes between v2026.1.20 and v2026.1.21.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.