← All recipes
Moderne licensed

Registered owner type must inherit DependencyObject

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.FindRegisteredOwnerNotDependencyObjectArtifactOpenRewrite.Recipes.CSharp.CodeQuality

DependencyProperty.Register stores the owner type for run-time lookups and requires it to be a DependencyObject. Flags a registration whose owner is not, which throws when the property is used; an attached property should use RegisterAttached instead.

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

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

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