← All recipes
Moderne licensed

CLR method for a DependencyProperty must match registered name

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.RenameClrAccessorMethodToMatchRegisteredNameArtifactOpenRewrite.Recipes.CSharp.CodeQuality

The static accessor methods for an attached property must be named Get<RegisteredName> and Set<RegisteredName>, which is how the XAML designer pairs them with the registration. Renames the methods and all calls to them.

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.RenameClrAccessorMethodToMatchRegisteredName

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

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