Cast the sender of a dependency property callback to the containing type

Proprietary

A direct cast of the sender in a PropertyChangedCallback or CoerceValueCallback should name the type that registered the property rather than a base type, so that the cast documents what the sender really is.

OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.CastSenderToContainingType
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.CastSenderToContainingType

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.