Cast the sender of a dependency property callback to the correct type
Recipe ID
OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.CastSenderToCorrectTypeArtifactOpenRewrite.Recipes.CSharp.CodeQualityThe DependencyObject passed to a PropertyChangedCallback or CoerceValueCallback is the type that registered the property. Replaces a cast, as, is or case conversion naming a type the sender can never be with the registering type.
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.CastSenderToCorrectTypeIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality