← All recipes
Moderne licensed

CLR property for a DependencyProperty should match registered name

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.RenameClrPropertyToMatchRegisteredNameArtifactOpenRewrite.Recipes.CSharp.CodeQuality

The CLR property wrapping a DependencyProperty must be named after the name the property was registered with, because XAML resolves it by that name. Renames the property and all references to it.

Single recipecsharpcode-qualityProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.RenameClrPropertyToMatchRegisteredName

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality