← All recipes
Moderne licensed

Cast the value of a dependency property callback to the exact type

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.CastValueToExactTypeArtifactOpenRewrite.Recipes.CSharp.CodeQuality

A direct cast of the value in a dependency property callback should name the type the property was registered with rather than a base type, so that the cast documents what the value really is.

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

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

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