← All recipes
Moderne licensed

Use same dependency property in get and set

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.RequireSameDependencyPropertyInGetAndSetArtifactOpenRewrite.Recipes.CSharp.CodeQuality

The get and set accessors of a CLR property wrapping a dependency property must pass the same dependency property to GetValue and SetValue. Flags a property whose accessors disagree, including the read-only case where the setter must use the DependencyPropertyKey paired with the getter's DependencyProperty.

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

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

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