Use the registered routed event handler type
Recipe ID
OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.UseRegisteredRoutedEventHandlerTypeArtifactOpenRewrite.Recipes.CSharp.CodeQualityA handler passed to EventManager.RegisterClassHandler, AddHandler or RemoveHandler must be constructed with the delegate type the RoutedEvent was registered with; WPF rejects any other at run time. Replaces the wrong delegate type with the registered one.
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.UseRegisteredRoutedEventHandlerTypeIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality