Use the registered handler type

Proprietary

An event backed by a RoutedEvent must be declared with the handler type passed to EventManager.RegisterRoutedEvent. Flags a declaration whose type differs, which throws when a handler is added.

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

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