SetValue must use the registered type

Proprietary

SetValue and SetCurrentValue take the value as object, so the compiler cannot check it against the type the DependencyProperty was registered with. Flags a call whose value does not fit the registered type, which throws at run time.

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

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