SetValue must use the registered type
ProprietarySetValue 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. FindSetValueTypeMismatchmod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Wpf. FindSetValueTypeMismatchInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.